[FFmpeg-devel] [PATCH 4/8] Prevent the RM demuxer from returning uninitialized AVPacket in case of corrupted streams.
fenrir at elivagar.org
fenrir at elivagar.org
Sat Sep 17 16:56:32 CEST 2011
From: Laurent Aimar <fenrir at videolan.org>
---
libavformat/rmdec.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 02ff7e9..1c96573 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -764,6 +764,8 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
ast->sub_packet_cnt = 0;
rm->audio_stream_num = st->index;
rm->audio_pkt_cnt = h * w / st->codec->block_align;
+ if (rm->audio_pkt_cnt <= 0)
+ return -1;
} else if ((ast->deint_id == DEINT_ID_VBRF) ||
(ast->deint_id == DEINT_ID_VBRS)) {
int x;
--
1.7.2.5
More information about the ffmpeg-devel
mailing list