Index: gstmpeg2dec.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-ugly/ext/mpeg2dec/gstmpeg2dec.c,v
retrieving revision 1.117
diff -u -r1.117 gstmpeg2dec.c
--- gstmpeg2dec.c	3 Nov 2006 09:52:12 -0000	1.117
+++ gstmpeg2dec.c	9 Nov 2006 13:31:39 -0000
@@ -94,7 +94,7 @@
         "format = (fourcc) { YV12, I420, Y42B }, "
         "width = (int) [ 16, 4096 ], "
         "height = (int) [ 16, 4096 ], "
-        "framerate = (fraction) { 24000/1001, 24/1, 25/1, 30000/1001, 30/1, 50/1, 60000/1001, 60/1 }")
+        "framerate = (fraction) [ 0/1, 2147483647/1 ]")
     );
 
 static void gst_mpeg2dec_base_init (gpointer g_class);
@@ -613,6 +613,7 @@
 handle_sequence (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
 {
   gint i;
+  gboolean found = FALSE;
   GstFlowReturn ret = GST_FLOW_OK;
 
   mpeg2dec->width = info->sequence->picture_width;
@@ -628,6 +629,20 @@
     if (info->sequence->frame_period == frame_periods[i]) {
       mpeg2dec->fps_n = fpss[i][0];
       mpeg2dec->fps_d = fpss[i][1];
+      found = TRUE;
+    }
+  }
+  if (!found) {
+    if (27000000 % info->sequence->frame_period == 0) {
+      mpeg2dec->fps_n = 27000000 / info->sequence->frame_period;
+      mpeg2dec->fps_d = 1;
+    } else if (27027000000LL % info->sequence->frame_period == 0) {
+      mpeg2dec->fps_n = 27027000000LL / info->sequence->frame_period;
+      mpeg2dec->fps_d = 1001;
+    } else {
+      /* FIXME */
+      mpeg2dec->fps_n = 27000000 / info->sequence->frame_period;
+      mpeg2dec->fps_d = 1;
     }
   }
   mpeg2dec->frame_period = info->sequence->frame_period * GST_USECOND / 27;
