libs: encoder: set rate control info only when query succeed

Currently, it set rate control information even when query fails.
In addition, it doesn't update any more since the flag
got_rate_control_mask is set to TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=779120
This commit is contained in:
Hyunjun Ko 2017-02-23 15:13:59 +09:00 committed by Víctor Manuel Jáquez Leal
parent 98b41956e1
commit 04a844ced0

View file

@ -855,11 +855,12 @@ get_rate_control_mask (GstVaapiEncoder * encoder)
continue;
rate_control_mask |= 1 << to_GstVaapiRateControl (1 << i);
}
}
GST_INFO ("supported rate controls: 0x%08x", rate_control_mask);
GST_INFO ("supported rate controls: 0x%08x", rate_control_mask);
encoder->got_rate_control_mask = TRUE;
encoder->rate_control_mask = cdata->rate_control_mask & rate_control_mask;
}
encoder->got_rate_control_mask = TRUE;
encoder->rate_control_mask = cdata->rate_control_mask & rate_control_mask;
return encoder->rate_control_mask;
}