From 2b9493b5f08be68a47954fb16b0263c1e4c17914 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 5 Jun 2014 09:38:29 +0200 Subject: [PATCH] flvdemux: Query duration upstream first Upstream elements (like rtmpsrc) might be able to provide the duration more accurately than flvdemux. Especially with index-less vod files --- gst/flv/gstflvdemux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index d90069fa59..38c4f636f5 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -3136,6 +3136,11 @@ gst_flv_demux_query (GstPad * pad, GstObject * parent, GstQuery * query) { GstFormat format; + /* Try to push upstream first */ + res = gst_pad_peer_query (demux->sinkpad, query); + if (res) + goto beach; + gst_query_parse_duration (query, &format, NULL); /* duration is time only */