matroskaenc: check avio_open_dyn_buf return value

CC: libav-stable@libav.org
Bug-Id: CID 703629
This commit is contained in:
Vittorio Giovara 2014-10-24 00:05:55 +01:00
parent e0caa1eb4e
commit 28c020d4df
1 changed files with 5 additions and 2 deletions

View File

@ -1443,8 +1443,11 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
ts += mkv->tracks[pkt->stream_index].ts_offset;
if (!s->pb->seekable) {
if (!mkv->dyn_bc)
avio_open_dyn_buf(&mkv->dyn_bc);
if (!mkv->dyn_bc) {
ret = avio_open_dyn_buf(&mkv->dyn_bc);
if (ret < 0)
return ret;
}
pb = mkv->dyn_bc;
}