[FFmpeg-devel] [PATCH 2/2] ffplay: use frame count based queueing for audio queue

REN Lifeng renlifeng at wowfly.com
Tue Mar 20 06:58:46 CET 2012


Sorry about my last reply.

The fact is Marton Balint's patch fixes bug #1035.

I forgot to apply the second part of his patch. Sorry again.

REN Lifeng <renlifeng at wowfly.com> writes:

> Marton Balint <cus at passwd.hu> writes:
>
>> This reduces the number of queued frames for audio data but also reduces the
>> amount of A-V difference after changing the audio stream (because less frames
>> are queued). Fixes bug #1035.
>>
>> Signed-off-by: Marton Balint <cus at passwd.hu>
>> ---
>>  ffplay.c |    3 +--
>>  1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/ffplay.c b/ffplay.c
>> index 8a5818f..00be13d 100644
>> --- a/ffplay.c
>> +++ b/ffplay.c
>> @@ -64,7 +64,6 @@ const char program_name[] = "ffplay";
>>  const int program_birth_year = 2003;
>>  
>>  #define MAX_QUEUE_SIZE (15 * 1024 * 1024)
>> -#define MIN_AUDIOQ_SIZE (20 * 16 * 1024)
> This change is not in master. 
>>  #define MIN_FRAMES 5
>>  
>>  /* SDL audio buffer size, in samples. Should be small to have precise
>> @@ -2612,7 +2611,7 @@ static int read_thread(void *arg)
>>  
>>          /* if the queue are full, no need to read more */
>>          if (   is->audioq.size + is->videoq.size + is->subtitleq.size > MAX_QUEUE_SIZE
>> -            || (   (is->audioq   .size  > MIN_AUDIOQ_SIZE || is->audio_stream < 0)
>> +            || (   (is->audioq   .nb_packets > MIN_FRAMES || is->audio_stream < 0)
> This change is in.
>>                  && (is->videoq   .nb_packets > MIN_FRAMES || is->video_stream < 0)
>>                  && (is->subtitleq.nb_packets > MIN_FRAMES || is->subtitle_stream < 0))) {
>>              /* wait 10 ms */
>
> This patch is not enough to fix bug #1035.
>
> I pulled from git master today. It seems the first change is not
> committed but the second is. 
>
> The reported problem is still there.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list