[FFmpeg-cvslog] r15653 - trunk/libavcodec/rawenc.c

Benoit Fouet ml_benoitfouet
Wed Oct 22 09:32:42 CEST 2008


Hi,

Michael Niedermayer wrote:
> On Tue, Oct 21, 2008 at 01:56:14PM +0200, Benoit Fouet wrote:
>   
>> Michael Niedermayer wrote:
>>     
>>
>> [...]
>>
>>> still the true fix for this issue irrespective of above might be to use
>>> something like:
>>> (taken from ffmpeg.c stream copy case)
>>>             if(av_q2d(icodec->time_base) > av_q2d(ist->st->time_base) && av_q2d(ist->st->time_base) < 1.0/1000)
>>>                 codec->time_base = icodec->time_base;
>>>             else
>>>                 codec->time_base = ist->st->time_base;
>>>
>>> instead of where r_frame_rate is used when vsync=0
>>>
>>> for vsync!=0 the code that uses the guessed framerate/timebase is likely the
>>> best, for vsync==0 guessing the timebase is asking for trouble because no
>>> framedroping is done one can never gurantee that the guess will work.
>>>
>>>
>>>
>>>       
>> I'm really not sure I understood correctly what you meant, so the
>> attached fix might be totally wrong...
>> anyway, you'll find it attached.
>>     
>
> no, thats not what i meant, i meant changing
>             rfps      = ic->streams[i]->r_frame_rate.num;
>             rfps_base = ic->streams[i]->r_frame_rate.den;
> when vsync==0
>
> but this is untested i may very well be missing something
>
>   

this code belongs to opt_input_file function. When this function is
triggered, we don't know yet what vsync method we are going to use, so I
don't see how we can change things when vsync==0 there.

-- 
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com





More information about the ffmpeg-cvslog mailing list