[FFmpeg-devel] [PATCH] cuvid: Always calculate second field PTS from frame rate

Miroslav Slugeň thunder.m at email.cz
Thu Feb 9 22:30:01 EET 2017


Dne 9.2.2017 v 07:49 wm4 napsal(a):
> On Wed, 8 Feb 2017 23:31:54 +0100
> Miroslav Slugeň <thunder.m at email.cz> wrote:
>
>> It is much more robust solution to always calculate second field (when
>> deinterlacing) PTS from frame rate, then relating on previous PTS,
>> because if there are B frames in input and some video frames are
>> corrupted (dropped) it will calculate wrong PTS for second field and
>> could hang on encoding in do_video_out.
>>
>>
> Seems more like it'd make it less robust, because many files don't have
> a useful framerate set.
>
> I'm not sure why encoding is hanging (?), but that sounds like a
> different problem.
>
> Also, such reasoning should go into the commit message, instead of just
> the mail.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
I understand it now. I will try to find better solution, please ignore 
this patch.

Primary reason is when using cuvid as decoder with copyts we had alotof 
audio/video sync issues when there was B frame in input stream and some 
data was missing (gape in PTS).

M.


More information about the ffmpeg-devel mailing list