From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 785F74671A for ; Thu, 15 Jun 2023 15:40:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A74768C555; Thu, 15 Jun 2023 18:40:39 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2077D68C2FE for ; Thu, 15 Jun 2023 18:40:33 +0300 (EEST) Received: from localhost (217-74-0-168.hsi.r-kom.net [217.74.0.168]) by haasn.dev (Postfix) with ESMTPSA id EEB3348FA1 for ; Thu, 15 Jun 2023 17:40:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1686843632; bh=g4HW61c39b5QSHWIx1xMkLvHJl09+cgBU+AtSzDCrZc=; h=Date:From:To:Subject:In-Reply-To:References:From; b=IdJQeq1aSUyB2/K3ND3pYNaWBkCiq9sfOGXb6oV8f2hbMYC2/mE8+1nehvh0jhv1K JvDlMJxcDalcctVJ3Vno3mWCmtBaGBwFCksUJUAERAKh+688d9lG6zlhvfVR2kcnKz OvuMHEKFDF6WPEWVv3Sbs5snOEmLjgmY1F+oqskA= Date: Thu, 15 Jun 2023 17:40:31 +0200 Message-ID: <20230615174031.GB18952@haasn.xyz> From: Niklas Haas To: FFmpeg development discussions and patches In-Reply-To: References: MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: stop passing AV_NOPTS_VALUE on EOF X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, 15 Jun 2023 17:17:41 +0200 Paul B Mahol wrote: > Attached. > From 88fbb2fbfd2bb7cb3474d54cb197ee42b1404532 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol > Date: Thu, 15 Jun 2023 17:15:44 +0200 > Subject: [PATCH] avfilter/buffersrc: stop passing AV_NOPTS_VALUE on EOF > > Signed-off-by: Paul B Mahol > --- > libavfilter/buffersrc.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c > index 612541b803..ea50713701 100644 > --- a/libavfilter/buffersrc.c > +++ b/libavfilter/buffersrc.c > @@ -61,6 +61,7 @@ typedef struct BufferSourceContext { > AVChannelLayout ch_layout; > > int eof; > + int64_t last_pts; > } BufferSourceContext; > > #define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format, pts)\ > @@ -191,10 +192,12 @@ FF_ENABLE_DEPRECATION_WARNINGS > s->nb_failed_requests = 0; > > if (!frame) > - return av_buffersrc_close(ctx, AV_NOPTS_VALUE, flags); > + return av_buffersrc_close(ctx, s->last_pts, flags); > if (s->eof) > return AVERROR(EINVAL); > > + s->last_pts = frame->pts + frame->duration; > + > refcounted = !!frame->buf[0]; > > if (!(flags & AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT)) { > -- > 2.39.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Confirming that this fixes a bug I was encountering. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".