theora: Fix SIGFPE when using 0/1 framerate
authorBenjamin Otte <otte@redhat.com>
Mon, 8 Mar 2010 20:57:03 +0000 (21:57 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 8 Mar 2010 21:28:27 +0000 (22:28 +0100)
libtheora crashes with a 0 framerate, so let's forbid it.

https://bugzilla.redhat.com/show_bug.cgi?id=571289

ext/theora/gsttheoraenc.c

index 121d382..ced73d1 100644 (file)
@@ -164,7 +164,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("video/x-raw-yuv, "
         "format = (fourcc) { I420, Y42B, Y444 }, "
-        "framerate = (fraction) [0/1, MAX], "
+        "framerate = (fraction) [1/MAX, MAX], "
         "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]")
     );
 
@@ -487,7 +487,7 @@ theora_enc_sink_getcaps (GstPad * pad)
 
   caps_string = g_strdup_printf ("video/x-raw-yuv, "
       "format = (fourcc) { %s }, "
-      "framerate = (fraction) [0/1, MAX], "
+      "framerate = (fraction) [1/MAX, MAX], "
       "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]",
       supported_formats);
   caps = gst_caps_from_string (caps_string);