mimic: Always return on failure

Message ID 20151102200515.C0F015DAAE@aruru.libav.org
State New
Headers show

Commit Message

Janne Grunau Nov. 2, 2015, 8:05 p.m.
Module: libav
Branch: master
Commit: 4a326923381f2bc0fb7d960c8f8366a5456bc4ab

Author:    Luca Barbato <lu_zero@gentoo.org>
Committer: Luca Barbato <lu_zero@gentoo.org>
Date:      Sun Nov  1 04:07:46 2015 +0100

mimic: Always return on failure

Bug-Id: 905
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

---

 libavcodec/mimic.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 379cffc..b8b3285 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -431,10 +431,9 @@  static int mimic_decode_frame(AVCodecContext *avctx, void *data,
     res = decode(ctx, quality, num_coeffs, !is_pframe);
     ff_thread_report_progress(&ctx->frames[ctx->cur_index], INT_MAX, 0);
     if (res < 0) {
-        if (!(avctx->active_thread_type & FF_THREAD_FRAME)) {
+        if (!(avctx->active_thread_type & FF_THREAD_FRAME))
             ff_thread_release_buffer(avctx, &ctx->frames[ctx->cur_index]);
-            return res;
-        }
+        return res;
     }
 
     if ((res = av_frame_ref(data, ctx->frames[ctx->cur_index].f)) < 0)