aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-27 12:52:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-27 12:52:17 +0200
commit231201382ea0697b9e29fabcd7996db719ea8b9a (patch)
treec85ee5f3bc493d1fb3ad89c7de4b179d52f56378
parentda2038221bc68e28edaaeddecff8d48cce2c9e52 (diff)
parent0fb3e1c6ce50ae4366c7e5571f2a8278d7fd6297 (diff)
downloadffmpeg-231201382ea0697b9e29fabcd7996db719ea8b9a.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: movenc: Check for errors from mov_create_chapter_track Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/movenc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 4c8cc9646d..ce0dfba857 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3834,7 +3834,8 @@ static int mov_write_header(AVFormatContext *s)
mov->time += 0x7C25B080; // 1970 based -> 1904 based
if (mov->chapter_track)
- mov_create_chapter_track(s, mov->chapter_track);
+ if (mov_create_chapter_track(s, mov->chapter_track) < 0)
+ goto error;
if (mov->flags & FF_MOV_FLAG_RTP_HINT) {
/* Initialize the hint tracks for each audio and video stream */
@@ -4019,7 +4020,8 @@ static int mov_write_trailer(AVFormatContext *s)
if (!mov->chapter_track && !(mov->flags & FF_MOV_FLAG_FRAGMENT)) {
if (mov->mode & (MODE_MP4|MODE_MOV|MODE_IPOD) && s->nb_chapters) {
mov->chapter_track = mov->nb_streams++;
- mov_create_chapter_track(s, mov->chapter_track);
+ if ((res = mov_create_chapter_track(s, mov->chapter_track)) < 0)
+ goto error;
}
}
@@ -4082,6 +4084,7 @@ static int mov_write_trailer(AVFormatContext *s)
}
}
+error:
mov_free(s);
return res;