summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index e04f455ed2..d9832e2f2c 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2292,7 +2292,8 @@ int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f)
{
- av_frame_unref(f->f);
+ if (f->f)
+ av_frame_unref(f->f);
}
void ff_thread_finish_setup(AVCodecContext *avctx)