diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-02-06 15:18:09 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-02-09 17:22:51 +0100 |
commit | e1edfe641609b08288090b77dc439861f75df5ea (patch) | |
tree | e8db96e9237a7e0b199c2a7d788305bd461a8d11 | |
parent | 02220b88fc38ef9dd4f2d519f5d3e4151258b60c (diff) | |
download | ffmpeg-e1edfe641609b08288090b77dc439861f75df5ea.tar.gz |
avcodec/pthread_frame: Properly unref frame in case of decoding failure
Use ff_thread_release_buffer() instead of av_frame_unref(),
as the former handles the case of non-thread-safe callbacks
properly. (This is possible now that ff_thread_release_buffer()
no longer requires a ThreadFrame.)
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/pthread_frame.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 75b70a17ec..27ed0b2cc4 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -223,7 +223,7 @@ FF_ENABLE_DEPRECATION_WARNINGS 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"); - av_frame_unref(p->frame); + ff_thread_release_buffer(avctx, p->frame); } if (atomic_load(&p->state) == STATE_SETTING_UP) |