Since there is duplicated code in h264/265 encoder, we could refactor it to avoid duplicated code. https://bugzilla.gnome.org/show_bug.cgi?id=778750 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>