mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/matroskaenc: add missing allocation failure checks for stream durations
Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 5f67073b4cb12abf21ed840948b271903d61bf3b)
This commit is contained in:
parent
8d51090dcb
commit
2940b3e17c
@ -1982,6 +1982,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…
x
Reference in New Issue
Block a user