[vlc-commits] Avcodec: use the already computed size
Jean-Baptiste Kempf
git at videolan.org
Sat Nov 30 21:31:18 CET 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Nov 29 19:28:59 2013 +0100| [12d3f5420446e8498a63f6a7969ba65b10703d13] | committer: Jean-Baptiste Kempf
Avcodec: use the already computed size
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=12d3f5420446e8498a63f6a7969ba65b10703d13
---
modules/codec/avcodec/audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 5c4de03..254c06d 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -83,7 +83,7 @@ static void InitDecoderConfig( decoder_t *p_dec, AVCodecContext *p_context )
{
static const uint8_t p_pattern[] = { 0, 0, 0, 36, 'a', 'l', 'a', 'c' };
/* Find alac atom XXX it is a bit ugly */
- for( i_offset = 0; i_offset < p_dec->fmt_in.i_extra - sizeof(p_pattern); i_offset++ )
+ for( i_offset = 0; i_offset < i_size - (int)sizeof(p_pattern); i_offset++ )
{
if( !memcmp( &p_src[i_offset], p_pattern, sizeof(p_pattern) ) )
break;
More information about the vlc-commits
mailing list