Browse code

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@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 66879ee125944b0efde673d9fbebbe9489853e59)

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

Andreas Cadhalpun authored on 2015/03/09 06:52:47
Showing 1 changed files
... ...
@@ -261,7 +261,7 @@ static int ffm2_read_header(AVFormatContext *s)
261 261
     AVIOContext *pb = s->pb;
262 262
     AVCodecContext *codec;
263 263
     int ret;
264
-    int f_main = 0, f_cprv, f_stvi, f_stau;
264
+    int f_main = 0, f_cprv = -1, f_stvi = -1, f_stau = -1;
265 265
     AVCodec *enc;
266 266
     char *buffer;
267 267