Commit 31b93ae2 authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

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

(cherry picked from commit 624a2a4c1d53731126f4c1c41682d8d9649870d4)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent cd16d0a1
......@@ -574,7 +574,9 @@ static int Demux( demux_t * p_demux )
if ( p_stream->fmt.i_cat == VIDEO_ES )
{
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;
}
}
......
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