[SCM] libav/experimental: return AVERROR_INVALIDDATA when the bitstream could not be decoded

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:52:30 UTC 2013


The following commit has been merged in the experimental branch:
commit 037396d099a7fd9215ed99295fa2c9a669ae22b6
Author: Sascha Sommer <saschasommer at freenet.de>
Date:   Sat Oct 3 09:44:05 2009 +0000

    return AVERROR_INVALIDDATA when the bitstream could not be decoded
    
    Originally committed as revision 20154 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index a489047..36fb08a 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;
 }
 
 /**

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list