From 698b432673894909ad6375a3210a2d592f9cbfae Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Thu, 21 Aug 2008 13:22:06 +0000 Subject: gst/matroska/matroska-demux.c: If the duration of a block is unknown only use the timestamp for the first lace and us... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup_or_simpleblock): If the duration of a block is unknown only use the timestamp for the first lace and use GST_CLOCK_TIME_NONE as duration for the following laces. Otherwise every lace has the same timestamp which leads to various problems. Really fixes bug #548831. --- gst/matroska/matroska-demux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gst') diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 8e0193d9..44471f1b 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -4214,8 +4214,10 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, next_lace: size -= lace_size[n]; - if (lace_time != GST_CLOCK_TIME_NONE) + if (lace_time != GST_CLOCK_TIME_NONE && duration) lace_time += duration / laces; + else + lace_time = GST_CLOCK_TIME_NONE; } } -- cgit