diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-02-22 12:27:49 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-02-22 12:32:44 +0100 |
commit | 92126195494dc6db256db217ab31503f4fea4c1e (patch) | |
tree | 9568369c0c2f133e867ca8dcc8b6ae3726b7eac3 /gst/audioconvert | |
parent | aa7ee3733d43203234c14fb14d4fea1daa7e053d (diff) |
update for new fixate_caps function
Diffstat (limited to 'gst/audioconvert')
-rw-r--r-- | gst/audioconvert/gstaudioconvert.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index 76b868cdb1..044b5b9ae3 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -79,7 +79,7 @@ static gboolean gst_audio_convert_get_unit_size (GstBaseTransform * base, GstCaps * caps, gsize * size); static GstCaps *gst_audio_convert_transform_caps (GstBaseTransform * base, GstPadDirection direction, GstCaps * caps, GstCaps * filter); -static void gst_audio_convert_fixate_caps (GstBaseTransform * base, +static GstCaps *gst_audio_convert_fixate_caps (GstBaseTransform * base, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps); static gboolean gst_audio_convert_set_caps (GstBaseTransform * base, GstCaps * incaps, GstCaps * outcaps); @@ -585,7 +585,7 @@ gst_audio_convert_fixate_channels (GstBaseTransform * base, GstStructure * ins, /* try to keep as many of the structure members the same by fixating the * possible ranges; this way we convert the least amount of things as possible */ -static void +static GstCaps * gst_audio_convert_fixate_caps (GstBaseTransform * base, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps) { @@ -593,7 +593,7 @@ gst_audio_convert_fixate_caps (GstBaseTransform * base, gint rate; const gchar *fmt; - g_return_if_fail (gst_caps_is_fixed (caps)); + othercaps = gst_caps_make_writable (othercaps); GST_DEBUG_OBJECT (base, "trying to fixate othercaps %" GST_PTR_FORMAT " based on caps %" GST_PTR_FORMAT, othercaps, caps); @@ -616,6 +616,8 @@ gst_audio_convert_fixate_caps (GstBaseTransform * base, gst_caps_truncate (othercaps); GST_DEBUG_OBJECT (base, "fixated othercaps to %" GST_PTR_FORMAT, othercaps); + + return othercaps; } static gboolean |