From: Arun Raghavan Date: Tue, 8 Feb 2011 18:09:24 +0000 (+0530) Subject: baseparse: Update min/max bitrate before first posting them X-Git-Tag: RELEASE-0.10.29~263 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0435d6fd63b1e253a5477dd3ca91c2cca61f9c3;p=platform%2Fupstream%2Fgst-plugins-good.git baseparse: Update min/max bitrate before first posting them This avoids posting an initial min-bitrate of G_UINTMAX and max-bitrate of 0. https://bugzilla.gnome.org/show_bug.cgi?id=641857 --- diff --git a/gst/audioparsers/gstbaseparse.c b/gst/audioparsers/gstbaseparse.c index 5be6363..75c945c 100644 --- a/gst/audioparsers/gstbaseparse.c +++ b/gst/audioparsers/gstbaseparse.c @@ -1227,7 +1227,9 @@ gst_base_parse_update_bitrates (GstBaseParse * parse, GstBaseParseFrame * frame) } else if (parse->priv->framecount == MIN_FRAMES_TO_POST_BITRATE) { /* always post all at threshold time */ update_min = update_max = update_avg = TRUE; - } else { + } + + if (G_LIKELY (parse->priv->framecount >= MIN_FRAMES_TO_POST_BITRATE)) { if (frame_bitrate < parse->priv->min_bitrate) { parse->priv->min_bitrate = frame_bitrate; update_min = TRUE;