Commit 57a07b9a authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mpeg: return frame size for dts and skip framing checks with raw dts

This reverts commit 1f0c9de8.
parent 6d30448f
......@@ -632,7 +632,8 @@ static int GenericProbe( demux_t *p_demux, int64_t *pi_offset,
int i_size = pf_check( &p_peek[i_skip], &i_samples );
if( i_size >= 0 )
{
if( i_size == 0 )
if( i_size == 0 || /* 0 sized frame ?? */
i_skip == 0 /* exact match from start, we're not WAVE either, so skip multiple checks (would break if padding) */ )
break;
/* If we have the frame size, check the next frame for
......@@ -1019,29 +1020,10 @@ static int DtsCheckSync( const uint8_t *p_peek, int *pi_samples )
&i_frame_length,
&i_audio_mode );
if( i_frame_size < 95 || i_frame_size > 16383 )
return VLC_EGENERIC;
switch( i_sample_rate )
{
case 0b0001:
case 0b0010:
case 0b0011:
case 0b0110:
case 0b0111:
case 0b1000:
case 0b1011:
case 0b1100:
case 0b1101:
break;
default:
return VLC_EGENERIC;
}
if( !i_bit_rate || i_bit_rate > 0x11101 )
if( i_frame_size != VLC_EGENERIC && i_frame_size <= 8192 )
return i_frame_size;
else
return VLC_EGENERIC;
return VLC_SUCCESS;
}
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