vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Dec 12 13:42:34 2016 +0100| [03dd2983ed522f2a55618a585d0d0af4ce6ca4a3] | committer: Francois Cartegnie
demux: ps: rename timestamp function > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=03dd2983ed522f2a55618a585d0d0af4ce6ca4a3 --- modules/demux/mpeg/pes.h | 3 ++- modules/demux/mpeg/ps.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/demux/mpeg/pes.h b/modules/demux/mpeg/pes.h index 1e024bc..9a2cc34 100644 --- a/modules/demux/mpeg/pes.h +++ b/modules/demux/mpeg/pes.h @@ -29,7 +29,8 @@ static inline mtime_t ExtractPESTimestamp( const uint8_t *p_data ) (mtime_t)(p_data[4] >> 1); } -static inline mtime_t ExtractMPEG1PESTimestamp( const uint8_t *p_data ) +/* PS SCR timestamp as defined in H222 2.5.3.2 */ +static inline mtime_t ExtractPackHeaderTimestamp( const uint8_t *p_data ) { return ((mtime_t)(p_data[ 0]&0x38 ) << 27)| ((mtime_t)(p_data[0]&0x03 ) << 28)| diff --git a/modules/demux/mpeg/ps.h b/modules/demux/mpeg/ps.h index ad65733..4b43230 100644 --- a/modules/demux/mpeg/ps.h +++ b/modules/demux/mpeg/ps.h @@ -369,7 +369,7 @@ static inline int ps_pkt_parse_pack( block_t *p_pkt, int64_t *pi_scr, uint8_t *p = p_pkt->p_buffer; if( p_pkt->i_buffer >= 14 && (p[4] >> 6) == 0x01 ) { - *pi_scr = FROM_SCALE_NZ( ExtractMPEG1PESTimestamp( &p[4] ) ); + *pi_scr = FROM_SCALE_NZ( ExtractPackHeaderTimestamp( &p[4] ) ); *pi_mux_rate = ( p[10] << 14 )|( p[11] << 6 )|( p[12] >> 2); } else if( p_pkt->i_buffer >= 12 && (p[4] >> 4) == 0x02 ) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
