[FFmpeg-cvslog] r15653 - trunk/libavcodec/rawenc.c
Benoit Fouet
ml_benoitfouet
Wed Oct 22 15:26:58 CEST 2008
Michael Niedermayer wrote:
> On Wed, Oct 22, 2008 at 09:32:42AM +0200, Benoit Fouet wrote:
>
>> 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.
>>
>
> well then the rfps code code maybe could be moved to where frame_rate is
> read, but one also has to consider overridden frame_rate by -r ...
>
>
I have no time right now to look at this issue...
if someone can do it, fine. If not, I'll revert this commit until I have
some time to look at it again.
--
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-cvslog
mailing list