From 2048126ea7a5df2aec55a0db24f642a05e80dca4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 8 Feb 2015 02:03:39 +0100 Subject: [PATCH] avcodec/utils: Assert that dst->progress is clear before ff_thread_ref_frame() Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 06b6a1f63b..c5e63000e1 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -3663,6 +3663,8 @@ int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src) if (ret < 0) return ret; + av_assert0(!dst->progress); + if (src->progress && !(dst->progress = av_buffer_ref(src->progress))) { ff_thread_release_buffer(dst->owner, dst);