From cfcaa23959f16ce0dc93a77cd367b794deeadb90 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 8 Mar 2013 14:57:39 +0100 Subject: [PATCH] dashdemux: small cleanup --- ext/dash/gstdashdemux.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index ecfa0a4097..5d7d56a043 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -1089,17 +1089,24 @@ gst_dash_demux_stream_loop (GstDashDemux * demux) } if (G_LIKELY (GST_IS_BUFFER (item->object))) { + GstBuffer *buffer; + GstClockTime timestamp; + + buffer = GST_BUFFER_CAST (item->object); + timestamp = GST_BUFFER_TIMESTAMP (buffer); + GST_LOG_OBJECT (demux, "Buffer with time %" GST_TIME_FORMAT, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (item->object))); - if (GST_BUFFER_TIMESTAMP (item->object) < best_time) { + GST_TIME_ARGS (timestamp)); + + if (timestamp < best_time) { GST_DEBUG_OBJECT (demux, "Found new best time: %" GST_TIME_FORMAT " %p", - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (item->object)), item->object); - best_time = GST_BUFFER_TIMESTAMP (item->object); + GST_TIME_ARGS (timestamp), buffer); + best_time = timestamp; selected_stream = stream; - } else if (!GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (item->object))) { + } else if (!GST_CLOCK_TIME_IS_VALID (timestamp)) { selected_stream = stream; GST_DEBUG_OBJECT (demux, "Buffer without timestamp selected %p", - item->object); + buffer); break; } } else {