From: Mark Nauwelaerts Date: Tue, 5 Oct 2010 14:00:45 +0000 (+0200) Subject: matroskademux: avoid infinite cluster scanning X-Git-Tag: RELEASE-0.10.26~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0d11f0644f084cdcad0c9f937a7d29a9262d6ce;p=platform%2Fupstream%2Fgst-plugins-good.git matroskademux: avoid infinite cluster scanning --- diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 6d42056..9ed6892 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -2515,6 +2515,13 @@ retry: if (cluster_time > time) { GST_DEBUG_OBJECT (demux, "overshot target"); /* cluster overshoots */ + if (cluster_offset == demux->first_cluster_offset) { + /* but no prev one */ + GST_DEBUG_OBJECT (demux, "but using first cluster anyway"); + prev_cluster_time = cluster_time; + prev_cluster_offset = cluster_offset; + break; + } if (prev_cluster_time != GST_CLOCK_TIME_NONE) { /* prev cluster did not overshoot, so prev cluster is target */ break;