gstvaapiencoder: framerate 0/1 is valid too
authorVictor Jaquez <vjaquez@igalia.com>
Thu, 18 Jun 2015 15:37:46 +0000 (17:37 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 4 Aug 2015 17:41:51 +0000 (19:41 +0200)
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

gst-libs/gst/vaapi/gstvaapiencoder.c

index 51be5d9..ab0d674 100644 (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;