mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
avformat/matroskaenc: add missing allocation failure checks for stream durations
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
9924f1bc34
commit
5f67073b4c
@ -1965,6 +1965,10 @@ static int mkv_write_header(AVFormatContext *s)
|
||||
// initialize stream_duration fields
|
||||
mkv->stream_durations = av_mallocz(s->nb_streams * sizeof(int64_t));
|
||||
mkv->stream_duration_offsets = av_mallocz(s->nb_streams * sizeof(int64_t));
|
||||
if (!mkv->stream_durations || !mkv->stream_duration_offsets) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = mkv_write_tracks(s);
|
||||
if (ret < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user