Commit 03dd2983 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: ps: rename timestamp function

parent 135e125b
......@@ -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)|
......
......@@ -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 )
......
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