From 900b2fb63dac15fe1013d9e326a7a5c8d4da1cca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 23 May 2011 13:25:44 +0100 Subject: [PATCH] flacdec: also try upstream first for duration query in DEFAULT format https://bugzilla.gnome.org/show_bug.cgi?id=650785 --- ext/flac/gstflacdec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 4957129dc..2e4085dd6 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -1724,8 +1724,9 @@ gst_flac_dec_src_query (GstPad * pad, GstQuery * query) gst_query_parse_duration (query, &fmt, NULL); - /* try any demuxers before us first */ - if (fmt == GST_FORMAT_TIME && peer && gst_pad_query (peer, query)) { + /* try any demuxers or parsers before us first */ + if ((fmt == GST_FORMAT_TIME || fmt == GST_FORMAT_DEFAULT) && + peer != NULL && gst_pad_query (peer, query)) { gst_query_parse_duration (query, NULL, &len); GST_DEBUG_OBJECT (flacdec, "peer returned duration %" GST_TIME_FORMAT, GST_TIME_ARGS (len)); -- 2.34.1