From 49ab4d9a45e7f99d6f3c550e21e4f4ba26f7ef39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 15 Jul 2012 12:59:44 +0100 Subject: [PATCH] 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. --- libs/gst/base/gstbaseparse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); -- 2.7.4