vlc | branch: master | Francois Cartegnie <[email protected]> | Sun Feb 8 14:58:06 2015 +0100| [57a07b9ab710e96757b69d777f67cfd18a3cd5f0] | committer: Francois Cartegnie
demux: mpeg: return frame size for dts and skip framing checks with raw dts This reverts commit 1f0c9de8b05929cd24cc23d0ec26678ce5ba2d8b. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57a07b9ab710e96757b69d777f67cfd18a3cd5f0 --- modules/demux/mpeg/es.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c index 7bb9ace..b626016 100644 --- a/modules/demux/mpeg/es.c +++ b/modules/demux/mpeg/es.c @@ -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 ) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
