avformat/movenc: Fix use of uninitialized variable (ret)
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 18 Feb 2015 15:18:26 +0000 (16:18 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 18 Feb 2015 15:33:15 +0000 (16:33 +0100)
Fixed CID1270823

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/movenc.c

index 12a9fec..5e172cb 100644 (file)
@@ -4946,8 +4946,10 @@ static int mov_write_header(AVFormatContext *s)
             else if (!TAG_IS_AVCI(track->tag)){
                 track->vos_len  = st->codec->extradata_size;
                 track->vos_data = av_malloc(track->vos_len);
-                if (!track->vos_data)
+                if (!track->vos_data) {
+                    ret = AVERROR(ENOMEM);
                     goto error;
+                }
                 memcpy(track->vos_data, st->codec->extradata, track->vos_len);
             }
         }