From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: Remove nonsense error message Date: Fri, 11 Feb 2022 12:20:00 +0100 Message-ID: <AM7PR03MB666052315221357BA95BEA1D8F309@AM7PR03MB6660.eurprd03.prod.outlook.com> (raw) If a frame-threaded decoder with inter-frame dependencies returns an error when decoding a frame and the returned frame isn't clean, an error message is emitted claiming that this is a bug. This seems to be based upon the thinking that in this case a ThreadFrame has not been properly unreferenced. Yet this is wrong, as decoders with inter-frame dependencies don't use the frame for output for synchronization and therefore don't use ThreadFrames at all for this. So unreferencing this frame generically is fine and not a bug. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- I hope my guess of the rationale for this message was correct; apologies if not. libavcodec/pthread_frame.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 27ed0b2cc4..33b5a2e628 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -219,12 +219,8 @@ FF_ENABLE_DEPRECATION_WARNINGS p->got_frame = 0; p->result = codec->decode(avctx, p->frame, &p->got_frame, p->avpkt); - if ((p->result < 0 || !p->got_frame) && p->frame->buf[0]) { - if (avctx->codec->caps_internal & FF_CODEC_CAP_ALLOCATE_PROGRESS) - av_log(avctx, AV_LOG_ERROR, "A frame threaded decoder did not " - "free the frame on failure. This is a bug, please report it.\n"); + if ((p->result < 0 || !p->got_frame) && p->frame->buf[0]) ff_thread_release_buffer(avctx, p->frame); - } if (atomic_load(&p->state) == STATE_SETTING_UP) ff_thread_finish_setup(avctx); -- 2.32.0 _______________________________________________ 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".
reply other threads:[~2022-02-11 11:20 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AM7PR03MB666052315221357BA95BEA1D8F309@AM7PR03MB6660.eurprd03.prod.outlook.com \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git