|
|
|
@ -37,7 +37,6 @@ void* queue_push(AVPacketQueue* queue, pthread_mutex_t* mutex, pthread_cond_t* c |
|
|
|
|
int next_to_write; |
|
|
|
|
for (;;) { |
|
|
|
|
next_to_write = queue_next(queue, current); |
|
|
|
|
//写的不等于读的,跳出循环
|
|
|
|
|
if (next_to_write != queue->next_to_read) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -51,7 +50,6 @@ void* queue_push(AVPacketQueue* queue, pthread_mutex_t* mutex, pthread_cond_t* c |
|
|
|
|
void *queue_pop(AVPacketQueue *queue, pthread_mutex_t *mutex, pthread_cond_t *cond) { |
|
|
|
|
int current = queue->next_to_read; |
|
|
|
|
for (;;) { |
|
|
|
|
//写的不等于读的,跳出循环
|
|
|
|
|
if (queue->next_to_write != queue->next_to_read) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|