[FFmpeg-cvslog] ffmdec: initialize f_cprv, f_stvi and f_stau

Andreas Cadhalpun git at videolan.org
Fri Mar 13 13:22:57 CET 2015


ffmpeg | branch: release/2.6 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sun Mar  8 22:52:47 2015 +0100| [2319fddfd359cc7e203fba8f20121ccd0c6e5389] | committer: Michael Niedermayer

ffmdec: initialize f_cprv, f_stvi and f_stau

They are used in a switch statement, but it is not guaranteed that the
COMM case (where they are set to 0) is reached before the other cases.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 66879ee125944b0efde673d9fbebbe9489853e59)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/ffmdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 987f419..280a24c 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -261,7 +261,7 @@ static int ffm2_read_header(AVFormatContext *s)
     AVIOContext *pb = s->pb;
     AVCodecContext *codec;
     int ret;
-    int f_main = 0, f_cprv, f_stvi, f_stau;
+    int f_main = 0, f_cprv = -1, f_stvi = -1, f_stau = -1;
     AVCodec *enc;
     char *buffer;
 



More information about the ffmpeg-cvslog mailing list