Commit 12d3f542 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Avcodec: use the already computed size

parent b22c4573
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment