[vlc-commits] demux: ogg: no pts for non xiph video codecs (fix #19271)
Francois Cartegnie
git at videolan.org
Fri Dec 15 16:42:43 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec 15 14:44:22 2017 +0100| [684c0f8ec1fc223d3f04aeed246b9e8d8782e644] | committer: Francois Cartegnie
demux: ogg: no pts for non xiph video codecs (fix #19271)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=684c0f8ec1fc223d3f04aeed246b9e8d8782e644
---
modules/demux/ogg.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 4eefa4c558..55f398a0d9 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1380,7 +1380,6 @@ static void Ogg_DecodePacket( demux_t *p_demux,
}
if( !( p_block = block_Alloc( p_oggpacket->bytes ) ) ) return;
- p_block->i_pts = p_stream->i_pcr;
DemuxDebug( msg_Dbg(p_demux, "block set from granule %"PRId64" to pts/pcr %"PRId64" skip %d",
p_oggpacket->granulepos, p_stream->i_pcr, p_stream->i_skip_frames); )
@@ -1433,6 +1432,16 @@ static void Ogg_DecodePacket( demux_t *p_demux,
p_block->i_dts = p_stream->i_pcr;
}
}
+ else if( p_stream->fmt.i_codec == VLC_CODEC_THEORA )
+ {
+ p_block->i_pts =
+ p_block->i_dts = p_stream->i_pcr;
+ }
+ else
+ {
+ p_block->i_pts = VLC_TS_INVALID;
+ p_block->i_dts = p_stream->i_pcr;
+ }
}
else if( p_stream->fmt.i_cat == AUDIO_ES )
{
@@ -1457,10 +1466,12 @@ static void Ogg_DecodePacket( demux_t *p_demux,
/* Blatant abuse of the i_length field. */
p_block->i_length = p_stream->i_end_trim;
+ p_block->i_pts = p_block->i_dts = p_stream->i_pcr;
}
else if( p_stream->fmt.i_cat == SPU_ES )
{
p_block->i_length = 0;
+ p_block->i_pts = p_block->i_dts = p_stream->i_pcr;
}
if( p_stream->fmt.i_codec != VLC_CODEC_VORBIS &&
More information about the vlc-commits
mailing list