[vlc-commits] demux: ogg: no pts for non xiph video codecs (fix #19271)
Francois Cartegnie
git at videolan.org
Fri Dec 15 16:44:25 CET 2017
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec 15 14:44:22 2017 +0100| [f1ba71c2825397ad68bf1eebcef80087e9715b74] | committer: Francois Cartegnie
demux: ogg: no pts for non xiph video codecs (fix #19271)
(cherry picked from commit 684c0f8ec1fc223d3f04aeed246b9e8d8782e644)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f1ba71c2825397ad68bf1eebcef80087e9715b74
---
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 5a89d34156..be3cd839c8 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1373,7 +1373,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); )
@@ -1426,6 +1425,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 )
{
@@ -1450,10 +1459,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