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,8 +3124,18 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
break;
}
if ( *pi_nb_samples == QT_V0_MAX_SAMPLES )
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 )
i = UINT32_MAX;
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