[FFmpeg-cvslog] rmdec: check av_new_packet return value
Vittorio Giovara
git at videolan.org
Tue Oct 21 23:41:45 CEST 2014
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Oct 20 14:11:17 2014 +0100| [7207dd8f829baee58b4df6c97c19ffde77039e8d] | committer: Vittorio Giovara
rmdec: check av_new_packet return value
CC: libav-stable at libav.org
Bug-Id: CID 733714
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7207dd8f829baee58b4df6c97c19ffde77039e8d
---
libavformat/rmdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 79a0756..40cc357 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);
More information about the ffmpeg-cvslog
mailing list