[FFmpeg-devel] [PATCH] ffmpeg: remove unused and errorneous AVFrame timestamp check

Michael Niedermayer michael at niedermayer.cc
Tue Oct 4 14:23:48 EEST 2016


On Tue, Oct 04, 2016 at 08:41:42AM +0200, Hendrik Leppkes wrote:
> On Tue, Oct 4, 2016 at 4:05 AM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> > On Sat, Oct 01, 2016 at 04:15:45PM +0200, Hendrik Leppkes wrote:
> >> Decoders have previously not used AVFrame.pts, and with the upcoming
> >> deprecation of pkt_pts (in favor of pts), this would lead to an errorneous
> >> interpration of timestamps.
> >
> > I probably misunderstand the commit message but
> > If code is changed in a user application that cannot really lift
> > some blockage from changing a lib.
> > a lib can only change in an incompaible way with (deprecation and)
> > major version bump.
> >
> 
> The lib never did what this code suggests it did, not that I remember
> (so at least not for a long long time).

release/2.0 with

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 29d5492..57c8d50 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2008,7 +2008,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
                 avci->to_free.extended_data = avci->to_free.data;
                 memset(picture->buf, 0, sizeof(picture->buf));
             }
-
+av_assert0(picture->pts == 0 || picture->pts == AV_NOPTS_VALUE);
             avctx->frame_number++;
             av_frame_set_best_effort_timestamp(picture,
                                                guess_correct_pts(avctx,

causes many tests to fail, indicating that AVFrame.pts was set for
several video decoders, the ffmpeg code is audio decoder specific
and i failed to find a case where it was triggered, i tried IIRC 3
or so checkouts from the past

so AVFrame.pts was maybe never set for decoding audio but it was set
for video

make: *** [fate-force_key_frames] Error 134
make: *** [fate-vsynth1-h263] Error 134
make: *** [fate-vsynth1-h263-obmc] Error 134
make: *** [fate-vsynth1-h263p] Error 134
make: *** [fate-vsynth1-mpeg4-rc] Error 134
make: *** [fate-vsynth1-mpeg4] Error 134
make: *** [fate-vsynth1-mpeg4-error] Error 134
make: *** [fate-vsynth1-mpeg4-nr] Error 134
make: *** [fate-vsynth1-mpeg4-adv] Error 134
make: *** [fate-vsynth1-mpeg4-thread] Error 134
make: *** [fate-vsynth1-mpeg4-qpel] Error 134
make: *** [fate-vsynth1-mpeg4-adap] Error 134
make: *** [fate-vsynth1-mpeg4-qprd] Error 134
make: *** [fate-vsynth2-h263] Error 134
make: *** [fate-vsynth2-h263-obmc] Error 134
make: *** [fate-vsynth2-h263p] Error 134
make: *** [fate-vsynth2-mpeg4] Error 134
make: *** [fate-vsynth2-mpeg4-rc] Error 134
make: *** [fate-vsynth2-mpeg4-adv] Error 134
make: *** [fate-vsynth2-mpeg4-error] Error 134
make: *** [fate-vsynth2-mpeg4-thread] Error 134
make: *** [fate-vsynth2-mpeg4-nr] Error 134
make: *** [fate-vsynth2-mpeg4-adap] Error 134
make: *** [fate-vsynth2-mpeg4-qprd] Error 134
make: *** [fate-vsynth2-mpeg4-qpel] Error 134
make: *** [fate-lavf-avi] Error 134
make: *** [fate-lavf-gif] Error 134
make: *** [fate-lavf-mkv] Error 134
make: *** [fate-lavf-ismv] Error 134
make: *** [fate-lavf-mov] Error 134
make: *** [fate-lavf-nut] Error 134
make: *** [fate-gif-color] Error 134
make: *** [fate-gif-disposal-background] Error 134
make: *** [fate-gif-disposal-restore] Error 134
make: *** [fate-gif-gray] Error 134
make: *** [fate-gifenc-rgb8] Error 134
make: *** [fate-gifenc-bgr8] Error 134
make: *** [fate-gifenc-rgb4_byte] Error 134
make: *** [fate-gifenc-gray] Error 134
make: *** [fate-gifenc-bgr4_byte] Error 134
make: *** [fate-gifenc-pal8] Error 134

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161004/942b484a/attachment.sig>


More information about the ffmpeg-devel mailing list