[FFmpeg-cvslog] pthread_frame: fix uninitialized variable read

wm4 git at videolan.org
Mon Mar 27 14:22:23 EEST 2017


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Mon Mar 27 13:06:56 2017 +0200| [d7896e9b4228e5b7ffc7ef0d0f1cf145f518c819] | committer: wm4

pthread_frame: fix uninitialized variable read

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 at niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7896e9b4228e5b7ffc7ef0d0f1cf145f518c819
---

 libavcodec/pthread_frame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 6620a8d..b618be0 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -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 */



More information about the ffmpeg-cvslog mailing list