From 037396d099a7fd9215ed99295fa2c9a669ae22b6 Mon Sep 17 00:00:00 2001 From: Sascha Sommer Date: Sat, 3 Oct 2009 09:44:05 +0000 Subject: [PATCH] return AVERROR_INVALIDDATA when the bitstream could not be decoded Originally committed as revision 20154 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmaprodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index a489047956..36fb08ac79 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -1528,7 +1528,7 @@ static int decode_packet(AVCodecContext *avctx, *data_size = (int8_t *)s->samples - (int8_t *)data; s->packet_offset = get_bits_count(gb) & 7; - return get_bits_count(gb) >> 3; + return (s->packet_loss) ? AVERROR_INVALIDDATA : get_bits_count(gb) >> 3; } /** -- 2.11.0