diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-21 22:48:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-21 23:01:26 +0200 |
commit | 840bc8e284c8eead7f0f319e846f911dfb3fd48f (patch) | |
tree | 6e11272c19fbcc503d168955a50a8f49cc7d7ecd /libavformat/rmdec.c | |
parent | 6aa1cfed0b2266bb2340644c9e617c69f436fa5c (diff) | |
parent | 7207dd8f829baee58b4df6c97c19ffde77039e8d (diff) | |
download | ffmpeg-840bc8e284c8eead7f0f319e846f911dfb3fd48f.tar.gz |
Merge commit '7207dd8f829baee58b4df6c97c19ffde77039e8d'
* commit '7207dd8f829baee58b4df6c97c19ffde77039e8d':
rmdec: check av_new_packet return value
Conflicts:
libavformat/rmdec.c
See: c01a462cda8d7f298a3ac6d20752d23a11e43a8a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r-- | libavformat/rmdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 5d9c9b5b4f..98e773ca44 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -918,8 +918,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 { - if(av_new_packet(pkt, st->codec->block_align) < 0) - return AVERROR(ENOMEM); + 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); |