From patchwork Tue Oct 4 11:23:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 871 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp2087349vsd; Tue, 4 Oct 2016 04:24:01 -0700 (PDT) X-Received: by 10.28.74.199 with SMTP id n68mr14834813wmi.25.1475580241548; Tue, 04 Oct 2016 04:24:01 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z20si11956087wmd.101.2016.10.04.04.24.01; Tue, 04 Oct 2016 04:24:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 49F2D689D2B; Tue, 4 Oct 2016 14:23:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF559687EB9 for ; Tue, 4 Oct 2016 14:23:37 +0300 (EEST) Received: from mfilter24-d.gandi.net (mfilter24-d.gandi.net [217.70.178.152]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id ACFE21720D5 for ; Tue, 4 Oct 2016 13:23:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter24-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter24-d.gandi.net (mfilter24-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id Pf0nYhsE1g7L for ; Tue, 4 Oct 2016 13:23:50 +0200 (CEST) X-Originating-IP: 213.47.41.20 Received: from localhost (213-47-41-20.cable.dynamic.surfer.at [213.47.41.20]) (Authenticated sender: michael@niedermayer.cc) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 20AF31720EB for ; Tue, 4 Oct 2016 13:23:49 +0200 (CEST) Date: Tue, 4 Oct 2016 13:23:48 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20161004112348.GB5270@nb4> References: <20161001141545.9728-1-h.leppkes@gmail.com> <20161004020511.GA5270@nb4> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [FFmpeg-devel] [PATCH] ffmpeg: remove unused and errorneous AVFrame timestamp check X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Tue, Oct 04, 2016 at 08:41:42AM +0200, Hendrik Leppkes wrote: > On Tue, Oct 4, 2016 at 4:05 AM, Michael Niedermayer > 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 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 [...] 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,