This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 8b3525e7182535382aae97f4ed8ae47a547ddd81 Author: Julius Bairaktaris <[email protected]> AuthorDate: Mon Sep 28 07:29:03 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Mon Oct 19 12:02:10 2026 +0000 avcodec/vp9: take the discard flag from the packet that shows a frame A show_existing_frame packet outputs a reference to an earlier frame, whose AV_FRAME_FLAG_DISCARD comes from the packet that coded it. If that packet was discarded, the shown frame is dropped too. Take the flag from the showing packet, as is already done for pts and pkt_dts. fate-vp9-trim-preroll covers this with the trim bsf's preroll option. Assisted-by: Claude Opus 5.5 Signed-off-by: Julius Bairaktaris <[email protected]> --- libavcodec/vp9.c | 4 ++++ tests/fate/vpx.mak | 3 +++ tests/ref/fate/{vp9-10-show-existing-frame => vp9-trim-preroll} | 2 -- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index ce4e197c9d..c20b1002c1 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -1649,6 +1649,10 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pts = pkt->pts; frame->pkt_dts = pkt->dts; + if (pkt->flags & AV_PKT_FLAG_DISCARD) + frame->flags |= AV_FRAME_FLAG_DISCARD; + else + frame->flags &= ~AV_FRAME_FLAG_DISCARD; *got_frame = 1; return pkt->size; } diff --git a/tests/fate/vpx.mak b/tests/fate/vpx.mak index 9c52fc4898..764db4ce8b 100644 --- a/tests/fate/vpx.mak +++ b/tests/fate/vpx.mak @@ -141,6 +141,9 @@ FATE_VP9-$(call FRAMEMD5, IVF, VP9, SCALE_FILTER) += fate-vp9-05-resize fate-vp9-05-resize: CMD = framemd5 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-05-resize.ivf -s 352x288 -sws_flags bitexact+bilinear fate-vp9-05-resize: REF = $(SRC_PATH)/tests/ref/fate/vp9-05-resize +FATE_VP9-$(call FRAMEMD5, MATROSKA, VP9, TRIM_BSF) += fate-vp9-trim-preroll +fate-vp9-trim-preroll: CMD = framemd5 -bsf:v trim=start=133:preroll=1 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-10-show-existing-frame.webm + fate-vp9-encparams: CMD = venc_data $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-segmentation-aq-akiyo.webm 0 5 FATE_SAMPLES_DUMP_DATA-$(call DEMDEC, MATROSKA, VP9) += fate-vp9-encparams diff --git a/tests/ref/fate/vp9-10-show-existing-frame b/tests/ref/fate/vp9-trim-preroll similarity index 86% copy from tests/ref/fate/vp9-10-show-existing-frame copy to tests/ref/fate/vp9-trim-preroll index aeed44a168..0d2b256b6a 100644 --- a/tests/ref/fate/vp9-10-show-existing-frame +++ b/tests/ref/fate/vp9-trim-preroll @@ -7,8 +7,6 @@ #dimensions 0: 352x288 #sar 0: 1/1 #stream#, dts, pts, duration, size, hash -0, 0, 0, 1, 152064, 18981342ec178e082519451062c3a67f -0, 3, 3, 1, 152064, 04ab9dbeac49ec31be58f6e671698e05 0, 4, 4, 1, 152064, 4ed58a0ba93a5d97a232a50c5876cda2 0, 6, 6, 1, 152064, a41f00034923e56ba51a0b598acc2e3a 0, 7, 7, 1, 152064, 63fa55ae9535ccdf06d44cce8065dda6 -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
