matroskaenc: check avio_open_dyn_buf() retuen code

Fixes CID703629
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/6/merge
Michael Niedermayer 12 years ago
parent eed7406416
commit b1f517f503
  1. 8
      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;
}

Loading…
Cancel
Save