]> git.sesse.net Git - ffmpeg/commitdiff
pthread_frame: fix uninitialized variable read
authorwm4 <nfxjfg@googlemail.com>
Mon, 27 Mar 2017 11:06:56 +0000 (13:06 +0200)
committerwm4 <nfxjfg@googlemail.com>
Mon, 27 Mar 2017 11:21:20 +0000 (13:21 +0200)
Could lead to random behavior. This possibly happened due to commit
32a5b631267. This should/could probably be simplified, but for no apply
a minimal fix to quell the errors.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pthread_frame.c

index 6620a8d324462b2d858e5b146242fc9c43676d63..b618be0bf538ed0d013a787dfa9dccc2aff7c1e6 100644 (file)
@@ -468,7 +468,7 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
     FrameThreadContext *fctx = avctx->internal->thread_ctx;
     int finished = fctx->next_finished;
     PerThreadContext *p;
-    int err, ret;
+    int err, ret = 0;
 
     /* release the async lock, permitting blocked hwaccel threads to
      * go forward while we are in this function */