Commit e39d1a58 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ogg: fix PCR from opus granule.

Can't use granule 0 as it means there's still no valid first sample
after processing packet.
Fix start gap on opus webradios.
parent ce9dac0e
......@@ -912,7 +912,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
/* 1 frame per packet */
p_stream->i_interpolated_pcr += (CLOCK_FREQ / p_stream->f_rate);
else if( p_stream->fmt.i_codec == VLC_CODEC_OPUS &&
p_stream->i_previous_granulepos >= 0 &&
p_stream->i_previous_granulepos > 0 &&
( duration =
Ogg_OpusPacketDuration( p_stream, p_oggpacket ) ) > 0 )
{
......
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