summaryrefslogtreecommitdiff
path: root/libavcodec/wmaprodec.c
diff options
context:
space:
mode:
authorSascha Sommer <saschasommer@freenet.de>2009-10-03 09:44:05 +0000
committerSascha Sommer <saschasommer@freenet.de>2009-10-03 09:44:05 +0000
commit037396d099a7fd9215ed99295fa2c9a669ae22b6 (patch)
tree78b0c25561abc8c932d0c735c66cbf641d6d9847 /libavcodec/wmaprodec.c
parentdae0d1e21cb7cefdd0b49ceb35388e6e3acc5e78 (diff)
return AVERROR_INVALIDDATA when the bitstream could not be decoded
Originally committed as revision 20154 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r--libavcodec/wmaprodec.c2
1 files changed, 1 insertions, 1 deletions
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;
}
/**