From 643499378c6621ab6f96cbdb1b6bf4132777a5d8 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 15 May 2004 12:09:11 +0000 Subject: [PATCH] ext/gdk_pixbuf/: Add new pixbufscale element to scale RGB video using gdk_pixbuf, because gdk_pixbuf does BILINEAR an... Original commit message from CVS: * ext/gdk_pixbuf/Makefile.am: * ext/gdk_pixbuf/gstgdkpixbuf.c: (plugin_init): * ext/gdk_pixbuf/gstgdkpixbuf.h: Add new pixbufscale element to scale RGB video using gdk_pixbuf, because gdk_pixbuf does BILINEAR and HYPER interpolation correctly. * ext/theora/theoraenc.c: (theora_enc_chain), Discard buffer and return if explicit caps could not be set (theora_enc_get_property): Make _get return kbps for the bitrate consistent with the _set function. --- ext/theora/theoraenc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/theora/theoraenc.c b/ext/theora/theoraenc.c index c59158c7e8..634fc20538 100644 --- a/ext/theora/theoraenc.c +++ b/ext/theora/theoraenc.c @@ -259,7 +259,11 @@ theora_enc_chain (GstPad * pad, GstData * data) GstCaps *caps; caps = gst_caps_new_simple ("video/x-theora", NULL); - gst_pad_set_explicit_caps (enc->srcpad, caps); + if (!gst_pad_set_explicit_caps (enc->srcpad, caps)) { + gst_caps_free (caps); + gst_data_unref (data); + return; + } gst_caps_free (caps); /* first packet will get its own page automatically */ @@ -364,7 +368,7 @@ theora_enc_get_property (GObject * object, guint prop_id, switch (prop_id) { case ARG_BITRATE: - g_value_set_int (value, enc->video_bitrate); + g_value_set_int (value, enc->video_bitrate / 1000); break; case ARG_QUALITY: g_value_set_int (value, enc->video_quality);