mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-02 03:06:28 +02:00
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>
This commit is contained in:
parent
02220b88fc
commit
e1edfe6416
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user