lavf/movenc: check ff_mov_init_hinting() return
authorMatthieu Bouron <matthieu.bouron@gmail.com>
Thu, 4 Jul 2013 15:35:41 +0000 (17:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 4 Jul 2013 17:51:40 +0000 (19:51 +0200)
Fixes a crash when the codec stream is not supported by the rtp muxer.

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

index 5d224bc..47d1cd7 100644 (file)
@@ -3733,7 +3733,8 @@ static int mov_write_header(AVFormatContext *s)
             AVStream *st = s->streams[i];
             if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
                 st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
-                ff_mov_init_hinting(s, hint_track, i);
+                if (ff_mov_init_hinting(s, hint_track, i) < 0)
+                    goto error;
                 hint_track++;
             }
         }