From: Tim-Philipp Müller Date: Sun, 15 Jul 2012 11:59:44 +0000 (+0100) Subject: baseparse: fix seekability querying with formats with headers like FLAC X-Git-Tag: RELEASE-0.11.93~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49ab4d9a45e7f99d6f3c550e21e4f4ba26f7ef39;p=platform%2Fupstream%2Fgstreamer.git baseparse: fix seekability querying with formats with headers like FLAC Move code that checks for upstream seekability and all that to the right place, otherwise it will never be done for formats that have headers such as FLAC, as handle_and_push frame will be called the first time only after headers have been processed (and framecount is > 0). This then makes us report that we can't seek, which disables the seek bar in totem. --- diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index b31a479..b69cac5 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -1838,12 +1838,6 @@ gst_base_parse_handle_and_push_frame (GstBaseParse * parse, g_return_val_if_fail (frame != NULL, GST_FLOW_ERROR); - /* some one-time start-up */ - if (G_UNLIKELY (!parse->priv->framecount)) { - gst_base_parse_check_seekability (parse); - gst_base_parse_check_upstream (parse); - } - buffer = frame->buffer; offset = frame->offset; @@ -2148,6 +2142,12 @@ gst_base_parse_finish_frame (GstBaseParse * parse, GstBaseParseFrame * frame, GST_LOG_OBJECT (parse, "finished frame at offset %" G_GUINT64_FORMAT ", " "flushing size %d", frame->offset, size); + /* some one-time start-up */ + if (G_UNLIKELY (parse->priv->framecount == 0)) { + gst_base_parse_check_seekability (parse); + gst_base_parse_check_upstream (parse); + } + if (parse->priv->scanning && frame->buffer) { if (!parse->priv->scanned_frame) { parse->priv->scanned_frame = gst_base_parse_frame_copy (frame);