[vlc-commits] demux: ogg: avoid negative pts due to prepcr roundings (fix #14348)
Francois Cartegnie
git at videolan.org
Fri Apr 10 03:00:18 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr 10 02:57:30 2015 +0200| [624a2a4c1d53731126f4c1c41682d8d9649870d4] | committer: Francois Cartegnie
demux: ogg: avoid negative pts due to prepcr roundings (fix #14348)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=624a2a4c1d53731126f4c1c41682d8d9649870d4
---
modules/demux/ogg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 3f5ac70..905a637 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -580,7 +580,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;
}
}
More information about the vlc-commits
mailing list