[vlc-commits] demux: mp4: don't set pts if no ctts
Francois Cartegnie
git at videolan.org
Tue Oct 27 19:13:54 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Oct 24 16:48:23 2015 +0200| [71c4cc66456facb59cd0eef1626be1be1befeb39] | committer: Francois Cartegnie
demux: mp4: don't set pts if no ctts
for WMV/VC1
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=71c4cc66456facb59cd0eef1626be1be1befeb39
---
modules/demux/mp4/mp4.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index d86f0e8..ff9fb3b 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4569,7 +4569,10 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t *p_track,
if ( p_track->p_es )
{
p_block->i_dts = VLC_TS_0 + i_nzdts;
- p_block->i_pts = VLC_TS_0 + i_nzpts;
+ if( p_track->fmt.i_cat == VIDEO_ES && !( p_trun->i_flags & MP4_TRUN_SAMPLE_TIME_OFFSET ) )
+ p_block->i_pts = VLC_TS_INVALID;
+ else
+ p_block->i_pts = VLC_TS_0 + i_nzpts;
p_block->i_length = CLOCK_FREQ * dur / p_track->i_timescale;
MP4_Block_Send( p_demux, p_track, p_block );
}
More information about the vlc-commits
mailing list