From: Tim-Philipp Müller Date: Fri, 30 Sep 2011 14:25:20 +0000 (+0100) Subject: baseparse: make estimating the position in query handler actually work X-Git-Tag: RELEASE-0.10.36~144 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ac0b70c15e7b5377e29e22a1ac09338818b87f7;p=platform%2Fupstream%2Fgstreamer.git baseparse: make estimating the position in query handler actually work No point estimating if we don't set the result afterwards. --- diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index f95c3aa..699b191 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -3163,14 +3163,14 @@ gst_base_parse_query (GstPad * pad, GstQuery * query) res = TRUE; } GST_OBJECT_UNLOCK (parse); - if (res) - gst_query_set_position (query, format, dest_value); - else { + if (!res) { /* no precise result, upstream no idea either, then best estimate */ /* priv->offset is updated in both PUSH/PULL modes */ res = gst_base_parse_convert (parse, GST_FORMAT_BYTES, parse->priv->offset, format, &dest_value); } + if (res) + gst_query_set_position (query, format, dest_value); } break; }