diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-20 14:11:17 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-21 14:37:48 +0100 |
commit | 7207dd8f829baee58b4df6c97c19ffde77039e8d (patch) | |
tree | fb02e5e4fc7642e0fa23f22962b7fd2c219d630f | |
parent | 629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae (diff) | |
download | ffmpeg-7207dd8f829baee58b4df6c97c19ffde77039e8d.tar.gz |
rmdec: check av_new_packet return value
CC: libav-stable@libav.org
Bug-Id: CID 733714
-rw-r--r-- | libavformat/rmdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 79a07566de..40cc35781e 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -816,7 +816,9 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb, ast->deint_id == DEINT_ID_VBRS) av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]); else { - av_new_packet(pkt, st->codec->block_align); + int ret = av_new_packet(pkt, st->codec->block_align); + if (ret < 0) + return ret; memcpy(pkt->data, ast->pkt.data + st->codec->block_align * //FIXME avoid this (ast->sub_packet_h * ast->audio_framesize / st->codec->block_align - rm->audio_pkt_cnt), st->codec->block_align); |