+2006-12-08 Wim Taymans <wim@fluendo.com>
+
+ Patch by: Sebastian Dröge <mail at slomosnail de >
+
+ * gst/audiofx/audiopanorama.c: (gst_audio_panorama_init),
+ (gst_audio_panorama_set_caps), (gst_audio_panorama_transform):
+ * gst/audiofx/audiopanorama.h:
+ Fix audiopanorame with float samples. Fixes #383726.
+
2006-12-08 Jan Schmidt <thaytan@mad.scientist.com>
* sys/sunaudio/gstsunaudiosink.c: (gst_sunaudiosink_reset):
GstAudioPanoramaClass * klass)
{
filter->panorama = 0;
+ filter->width = 0;
}
static void
GstAudioPanorama *filter = GST_AUDIO_PANORAMA (base);
const GstStructure *structure;
gboolean ret;
- gint channels;
+ gint channels, width;
const gchar *fmt;
/*GST_INFO ("incaps are %" GST_PTR_FORMAT, incaps); */
if (!ret)
goto no_channels;
+ ret = gst_structure_get_int (structure, "width", &width);
+ if (!ret)
+ goto no_width;
+ filter->width = width / 8;
+
+
fmt = gst_structure_get_name (structure);
GST_DEBUG ("try to process %s input with %d channels", fmt, channels);
no_channels:
GST_DEBUG ("no channels in caps");
return ret;
+no_width:
+ GST_DEBUG ("no width in caps");
+ return ret;
}
static void
GstBuffer * outbuf)
{
GstAudioPanorama *filter = GST_AUDIO_PANORAMA (base);
- guint num_samples = GST_BUFFER_SIZE (outbuf) / (2 * sizeof (gint16));
+ guint num_samples = GST_BUFFER_SIZE (outbuf) / (2 * filter->width);
if (!gst_buffer_is_writable (outbuf))
return GST_FLOW_OK;