mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 06:20:40 +00:00
Always check the return of mkv_add_seekhead_entry
Originally committed as revision 10371 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6d588ecd76
commit
9e2a3e2262
@ -754,14 +754,17 @@ static int mkv_write_trailer(AVFormatContext *s)
|
|||||||
MatroskaMuxContext *mkv = s->priv_data;
|
MatroskaMuxContext *mkv = s->priv_data;
|
||||||
ByteIOContext *pb = &s->pb;
|
ByteIOContext *pb = &s->pb;
|
||||||
offset_t currentpos, second_seekhead, cuespos;
|
offset_t currentpos, second_seekhead, cuespos;
|
||||||
|
int ret;
|
||||||
|
|
||||||
end_ebml_master(pb, mkv->cluster);
|
end_ebml_master(pb, mkv->cluster);
|
||||||
|
|
||||||
cuespos = mkv_write_cues(pb, mkv->cues, s->nb_streams);
|
cuespos = mkv_write_cues(pb, mkv->cues, s->nb_streams);
|
||||||
second_seekhead = mkv_write_seekhead(pb, mkv->cluster_seekhead);
|
second_seekhead = mkv_write_seekhead(pb, mkv->cluster_seekhead);
|
||||||
|
|
||||||
mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_CUES , cuespos);
|
ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_CUES , cuespos);
|
||||||
mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_SEEKHEAD, second_seekhead);
|
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);
|
mkv_write_seekhead(pb, mkv->main_seekhead);
|
||||||
|
|
||||||
// update the duration
|
// update the duration
|
||||||
|
Loading…
Reference in New Issue
Block a user