From 621ab4e4ef69ce5912430ded8bdd5e6b7d1ca196 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Thu, 4 Jul 2013 17:35:41 +0200 Subject: [PATCH] lavf/movenc: check ff_mov_init_hinting() return Fixes a crash when the codec stream is not supported by the rtp muxer. Signed-off-by: Michael Niedermayer --- libavformat/movenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 5d224bcacb..47d1cd79c6 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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++; } }