From cfc5ea685a0b487fab4cea62eeea90aa9e58e0e0 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Mon, 18 Aug 2008 15:05:32 +0000 Subject: ext/pulse/: The bytes_per_sample and silence_sample fields of the GstRingBufferSpec are already filled with the corre... Original commit message from CVS: * ext/pulse/pulsesink.c: (gst_pulsesink_prepare): * ext/pulse/pulsesrc.c: (gst_pulsesrc_prepare): The bytes_per_sample and silence_sample fields of the GstRingBufferSpec are already filled with the correct values by gst_ring_buffer_parse_caps() so there's no need to set them again with wrong values. --- ext/pulse/pulsesink.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'ext/pulse/pulsesink.c') diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index f80667d7..b0213341 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -584,16 +584,14 @@ gst_pulsesink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec) if (!pulsesink->context || pa_context_get_state (pulsesink->context) != PA_CONTEXT_READY) { GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED, ("Bad context state: %s", - pulsesink-> - context ? pa_strerror (pa_context_errno (pulsesink->context)) : - NULL), (NULL)); + pulsesink->context ? pa_strerror (pa_context_errno (pulsesink-> + context)) : NULL), (NULL)); goto unlock_and_fail; } if (!(pulsesink->stream = pa_stream_new (pulsesink->context, - pulsesink-> - stream_name ? pulsesink->stream_name : "Playback Stream", - &pulsesink->sample_spec, + pulsesink->stream_name ? pulsesink-> + stream_name : "Playback Stream", &pulsesink->sample_spec, gst_pulse_gst_to_channel_map (&channel_map, spec)))) { GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED, ("Failed to create stream: %s", @@ -636,9 +634,6 @@ gst_pulsesink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec) pa_threaded_mainloop_unlock (pulsesink->mainloop); - spec->bytes_per_sample = pa_frame_size (&pulsesink->sample_spec); - memset (spec->silence_sample, 0, spec->bytes_per_sample); - #if 0 gst_pulsesink_set_volume (pulsesink, pulsesink->volume); #endif -- cgit