From 11c39abc9a99d5fcb0070988ffe0d773d9780875 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 22 Nov 2005 22:21:37 +0000 Subject: More fractional framerate conversions Original commit message from CVS: * ext/cairo/gsttextoverlay.c: (gst_text_overlay_init), (gst_text_overlay_setcaps), (gst_text_overlay_collected): * ext/cairo/gsttextoverlay.h: * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_sink_link): * ext/gdk_pixbuf/gstgdkpixbuf.h: * ext/libpng/gstpngdec.c: (gst_pngdec_init), (gst_pngdec_caps_create_and_set): * ext/libpng/gstpngdec.h: * ext/libpng/gstpngenc.c: (gst_pngenc_setcaps): * gst/alpha/gstalphacolor.c: (gst_alpha_color_set_caps): * gst/avi/gstavimux.c: (gst_avimux_init), (gst_avimux_vidsinkconnect): * gst/flx/gstflxdec.c: (gst_flxdec_chain): * gst/goom/gstgoom.c: (gst_goom_init), (gst_goom_src_setcaps), (gst_goom_src_negotiate), (gst_goom_chain): * gst/goom/gstgoom.h: * gst/matroska/matroska-demux.c: (gst_matroska_demux_video_caps): * gst/matroska/matroska-mux.c: (gst_matroska_mux_video_pad_setcaps): * sys/osxvideo/osxvideosink.h: * sys/osxvideo/osxvideosink.m: More fractional framerate conversions --- gst/alpha/gstalphacolor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gst/alpha') diff --git a/gst/alpha/gstalphacolor.c b/gst/alpha/gstalphacolor.c index 9d28bbe3..04bc70cc 100644 --- a/gst/alpha/gstalphacolor.c +++ b/gst/alpha/gstalphacolor.c @@ -193,7 +193,7 @@ gst_alpha_color_set_caps (GstBaseTransform * btrans, GstCaps * incaps, GstAlphaColor *alpha; GstStructure *structure; gboolean ret; - gdouble fps; + const GValue *fps; gint red_mask; alpha = GST_ALPHA_COLOR (btrans); @@ -201,7 +201,8 @@ gst_alpha_color_set_caps (GstBaseTransform * btrans, GstCaps * incaps, ret = gst_structure_get_int (structure, "width", &alpha->in_width); ret &= gst_structure_get_int (structure, "height", &alpha->in_height); - ret &= gst_structure_get_double (structure, "framerate", &fps); + fps = gst_structure_get_value (structure, "framerate"); + ret &= (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)); ret &= gst_structure_get_int (structure, "red_mask", &red_mask); if (!ret) -- cgit