gstvaapiencoder: framerate 0/1 is valid too

Framerate 0/1 is valid, and it is particularly useful for picture
encoding, such as jpeg. This patch makes the encoder to admit that
framerate.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=744042
This commit is contained in:
Victor Jaquez 2015-06-18 17:37:46 +02:00 committed by Víctor Manuel Jáquez Leal
parent 954037cd24
commit 351496a304

View file

@ -452,7 +452,7 @@ check_video_info (GstVaapiEncoder * encoder, const GstVideoInfo * vip)
{
if (!vip->width || !vip->height)
goto error_invalid_resolution;
if (!vip->fps_n || !vip->fps_d)
if (vip->fps_n < 0 || vip->fps_d <= 0)
goto error_invalid_framerate;
return GST_VAAPI_ENCODER_STATUS_SUCCESS;