From 698b432673894909ad6375a3210a2d592f9cbfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 21 Aug 2008 13:22:06 +0000 Subject: [PATCH] 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. --- ChangeLog | 9 +++++++++ gst/matroska/matroska-demux.c | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b9139de9a4..b8a16f49cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-08-21 Sebastian Dröge + + * 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. + 2008-08-21 Sebastian Dröge * gst/wavenc/gstwavenc.c: (gst_wavenc_chain): diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 8e0193d989..44471f1b28 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; } }