From 351496a304d3cd9969b602707d25e0a95ec9fb45 Mon Sep 17 00:00:00 2001 From: Victor Jaquez Date: Thu, 18 Jun 2015 17:37:46 +0200 Subject: [PATCH] gstvaapiencoder: framerate 0/1 is valid too MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 https://bugzilla.gnome.org/show_bug.cgi?id=744042 --- gst-libs/gst/vaapi/gstvaapiencoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c index 51be5d9..ab0d674 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder.c @@ -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; -- 2.7.4