diff options
author | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:34 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:34 +0000 |
commit | 9e2a3e2262a6ea4d4bd98daf366aad218b7c0a22 (patch) | |
tree | 61dc31fd9653b1e94f353b643f85bb549c077285 /libavformat/matroskaenc.c | |
parent | 6d588ecd763f1375dbe237ee9345e18ffadfa3b1 (diff) | |
download | ffmpeg-9e2a3e2262a6ea4d4bd98daf366aad218b7c0a22.tar.gz |
Always check the return of mkv_add_seekhead_entry
Originally committed as revision 10371 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index dd20fb499e..65fc07e281 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -754,14 +754,17 @@ static int mkv_write_trailer(AVFormatContext *s) MatroskaMuxContext *mkv = s->priv_data; ByteIOContext *pb = &s->pb; offset_t currentpos, second_seekhead, cuespos; + int ret; end_ebml_master(pb, mkv->cluster); cuespos = mkv_write_cues(pb, mkv->cues, s->nb_streams); second_seekhead = mkv_write_seekhead(pb, mkv->cluster_seekhead); - mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_CUES , cuespos); - mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_SEEKHEAD, second_seekhead); + ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_CUES , cuespos); + if (ret < 0) return ret; + ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_SEEKHEAD, second_seekhead); + if (ret < 0) return ret; mkv_write_seekhead(pb, mkv->main_seekhead); // update the duration |