diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 20:38:36 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 21:05:15 +0400 |
commit | b1f517f503139ab9d0c406228b53663e86a128df (patch) | |
tree | 11c4c362f7bc3bc1be82fcaf3d3fe99cc3fe7b57 /libavformat | |
parent | eed7406416c3707042c76d6c96ea537f832fde52 (diff) |
matroskaenc: check avio_open_dyn_buf() retuen code
Fixes CID703629
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskaenc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index bcded7c060..0d387e7358 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1166,8 +1166,12 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt) } if (!s->pb->seekable) { - if (!mkv->dyn_bc) - avio_open_dyn_buf(&mkv->dyn_bc); + if (!mkv->dyn_bc) { + if ((ret = avio_open_dyn_buf(&mkv->dyn_bc)) < 0) { + av_log(s, AV_LOG_ERROR, "Failed to open dynamic buffer\n"); + return ret; + } + } pb = mkv->dyn_bc; } |