Commit 1a1f872f authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: fix AMR/v0 compressed chunks (fix #14352)

AMR is declared as V0, uncompressed chunk.
Reading a max of 1024 samples in that case is too much.
parent 2c2fc407
...@@ -3124,10 +3124,20 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp ...@@ -3124,10 +3124,20 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
break; break;
} }
switch( p_track->fmt.i_codec )
{
case VLC_CODEC_AMR_NB:
case VLC_CODEC_AMR_WB:
if ( *pi_nb_samples == 16 )
i = UINT32_MAX;
break;
default:
if ( *pi_nb_samples == QT_V0_MAX_SAMPLES ) if ( *pi_nb_samples == QT_V0_MAX_SAMPLES )
i = UINT32_MAX;
break; break;
} }
} }
}
//fprintf( stderr, "size=%d\n", i_size ); //fprintf( stderr, "size=%d\n", i_size );
return i_size; return i_size;
......
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