[FFmpeg-devel] yadif: Fix pts for is_second when next frame is seeked

Robert Nagy ronag89 at gmail.com
Sun Apr 15 15:31:31 CEST 2012


This is probably a bad idea, I'm unsure how to solve this.

The problem is the following, the pts for is_second frames is calculated
like this:

            yadif->out->pts =
                (yadif->next->pts&yadif->cur->pts) +
                ((yadif->next->pts^yadif->cur->pts)>>1);

However, if the source have seeked then the "yadif->next->pts" will not be
in relation to "yadif->cur->pts", thus yadif->out->pts is bogus.

e.g.

yadif->next->pts == 0; // seek to start, first frame
yadif->cur->pts == 1000; // last frame
yadif->out->pts == 500; // hm...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-pts-calculation-for-is_second-when-next-is-bogus.patch
Type: application/octet-stream
Size: 1350 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120415/bd7c29d8/attachment.obj>


More information about the ffmpeg-devel mailing list