Commit b1f517f5 authored by Michael Niedermayer's avatar Michael Niedermayer

matroskaenc: check avio_open_dyn_buf() retuen code

Fixes CID703629
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eed74064
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment