mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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
This commit is contained in:
parent
cfc3f5e43b
commit
3f683e0288
2 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue