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
This commit is contained in:
Jimmy Ohn 2016-03-21 16:06:20 +09:00 committed by Sebastian Dröge
parent 44b70ca3a1
commit 090d0d1961

View file

@ -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;
}