changeset 18236:d239a79a0002

Do not give bogus timestamps for laced packets with no default duration. Patch by Uoti Urpala ( uoti ! urpala () pp1 ! inet ! fi ).
author mosu
date Mon, 24 Apr 2006 06:28:45 +0000
parents 6fa6d986a863
children 4231482179b6
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Mon Apr 24 05:44:46 2006 +0000
+++ b/libmpdemux/demux_mkv.c	Mon Apr 24 06:28:45 2006 +0000
@@ -3143,6 +3143,10 @@
                   if (modified)
                     free (buffer);
                   dp->flags = (block_bref == 0 && block_fref == 0) ? 0x10 : 0;
+                  /* If default_duration is 0, assume no pts value is known
+                   * for packets after the first one (rather than all pts
+                   * values being the same) */
+                  if (i == 0 || track->default_duration)
                   dp->pts = mkv_d->last_pts + i * track->default_duration;
                   ds_add_packet (ds, dp);
                 }