summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2013-07-04 17:35:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-04 19:51:40 +0200
commit621ab4e4ef69ce5912430ded8bdd5e6b7d1ca196 (patch)
tree9ee6f944ecc1a562fe9f9d32d16999788af599ba /libavformat
parent8a8d9a738599d93710c30e2f33c93f2bd34b0660 (diff)
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 <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c3
1 files changed, 2 insertions, 1 deletions
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++;
}
}