From 090d0d19610a0321923b24045b3cc494ba246b3c Mon Sep 17 00:00:00 2001 From: Jimmy Ohn Date: Mon, 21 Mar 2016 16:06:20 +0900 Subject: [PATCH] decodebin: Modify result of seekable in check_upstream_seekable function In check_upstream_seekable function, it returns FALSE value even though we already declare about the seekable variable. So, This patch return result of seekable in check_upstream_seekable function. https://bugzilla.gnome.org/show_bug.cgi?id=763975 --- gst/playback/gstdecodebin2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 2ae745faeb..19a7e5b809 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -2794,14 +2794,11 @@ check_upstream_seekable (GstDecodeBin * dbin, GstPad * pad) query = gst_query_new_seeking (GST_FORMAT_BYTES); if (!gst_pad_peer_query (pad, query)) { GST_DEBUG_OBJECT (dbin, "seeking query failed"); - gst_query_unref (query); - return FALSE; + goto done; } gst_query_parse_seeking (query, NULL, &seekable, &start, &stop); - gst_query_unref (query); - /* try harder to query upstream size if we didn't get it the first time */ if (seekable && stop == -1) { GST_DEBUG_OBJECT (dbin, "doing duration query to fix up unset stop"); @@ -2812,10 +2809,13 @@ check_upstream_seekable (GstDecodeBin * dbin, GstPad * pad) * practice even if it technically may be seekable */ if (seekable && (start != 0 || stop <= start)) { GST_DEBUG_OBJECT (dbin, "seekable but unknown start/stop -> disable"); - return FALSE; + seekable = FALSE; + } else { + GST_DEBUG_OBJECT (dbin, "upstream seekable: %d", seekable); } - GST_DEBUG_OBJECT (dbin, "upstream seekable: %d", seekable); +done: + gst_query_unref (query); return seekable; }