Commit 29c4138d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

DTS in wav: check frame size

Close #7282
parent ada0afff
...@@ -920,8 +920,22 @@ static int A52Init( demux_t *p_demux ) ...@@ -920,8 +920,22 @@ static int A52Init( demux_t *p_demux )
*****************************************************************************/ *****************************************************************************/
static int DtsCheckSync( const uint8_t *p_peek, int *pi_samples ) static int DtsCheckSync( const uint8_t *p_peek, int *pi_samples )
{ {
/* TODO return frame size for robustness */ unsigned int i_sample_rate, i_bit_rate, i_frame_length, i_audio_mode;
return SyncCode( p_peek ); bool b_dts_hd;
VLC_UNUSED(pi_samples);
int i_frame_size = GetSyncInfo( p_peek,
&b_dts_hd,
&i_sample_rate,
&i_bit_rate,
&i_frame_length,
&i_audio_mode );
if( i_frame_size != VLC_EGENERIC && i_frame_size <= 8192 )
return VLC_SUCCESS;
else
return VLC_EGENERIC;
} }
static int DtsProbe( demux_t *p_demux, int64_t *pi_offset ) static int DtsProbe( demux_t *p_demux, int64_t *pi_offset )
......
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