Commit 624a2a4c authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ogg: avoid negative pts due to prepcr roundings (fix #14348)

parent 79efddce
...@@ -580,7 +580,9 @@ static int Demux( demux_t * p_demux ) ...@@ -580,7 +580,9 @@ static int Demux( demux_t * p_demux )
if ( p_stream->fmt.i_cat == VIDEO_ES ) if ( p_stream->fmt.i_cat == VIDEO_ES )
{ {
pagestamp = pagestamp - ( CLOCK_FREQ / p_stream->f_rate ); pagestamp = pagestamp - ( CLOCK_FREQ / p_stream->f_rate );
p_block->i_pts = p_sys->i_nzpcr_offset + pagestamp; if( pagestamp < 0 )
pagestamp = 0;
p_block->i_pts = VLC_TS_0 + p_sys->i_nzpcr_offset + pagestamp;
b_fixed = true; b_fixed = true;
} }
} }
......
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