From: <tho...@fr...> - 2005-05-25 11:58:15
|
CVS Root: /cvs//gstreamer Module: gst-plugins Changes by: thomasvs Date: Wed May 25 2005 04:57:48 PDT Branch: BRANCH-GSTREAMER-0_8 Log message: patch by: Ronald S. Bultje <rb...@ro...> * ext/alsa/gstalsa.c: (gst_alsa_get_caps), (gst_alsa_set_hw_params): workaround bug in dmix. Fixes #305186. Modified files: . : ChangeLog ext/alsa : gstalsa.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.1641.2.197&r2=1.1641.2.198 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/alsa/gstalsa.c.diff?r1=1.136.2.3&r2=1.136.2.4 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs//gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.1641.2.197 retrieving revision 1.1641.2.198 diff -u -d -r1.1641.2.197 -r1.1641.2.198 --- ChangeLog 25 May 2005 11:36:10 -0000 1.1641.2.197 +++ ChangeLog 25 May 2005 11:57:36 -0000 1.1641.2.198 @@ -1,5 +1,13 @@ 2005-05-25 Thomas Vander Stichele <thomas at apestaart dot org> + patch by: Ronald S. Bultje <rb...@ro...> + + * ext/alsa/gstalsa.c: (gst_alsa_get_caps), + (gst_alsa_set_hw_params): + workaround bug in dmix. Fixes #305186. +2005-05-25 Thomas Vander Stichele <thomas at apestaart dot org> patch by: Luca Ognibene <lu...@ti...> * sys/ximage/ximagesrc.c: (gst_ximagesrc_get), Index: gstalsa.c RCS file: /cvs//gstreamer/gst-plugins/ext/alsa/Attic/gstalsa.c,v retrieving revision 1.136.2.3 retrieving revision 1.136.2.4 diff -u -d -r1.136.2.3 -r1.136.2.4 --- gstalsa.c 5 May 2005 19:23:06 -0000 1.136.2.3 +++ gstalsa.c 25 May 2005 11:57:36 -0000 1.136.2.4 @@ -1049,7 +1049,6 @@ this->period_size = GST_ALSA_MAX_BUFFER_SZ / this->period_count; }; - snd_pcm_format_mask_alloca (&mask); snd_pcm_hw_params_get_format_mask (hw_params, mask); for (i = 0; i <= SND_PCM_FORMAT_LAST; i++) { @@ -1721,6 +1720,7 @@ snd_pcm_hw_params_t *hw_params; unsigned int rate; int ret; + snd_pcm_uframes_t period_size; g_return_val_if_fail (this != NULL, FALSE); g_return_val_if_fail (this->handle != NULL, FALSE); @@ -1782,10 +1782,13 @@ (guint) this->period_count, snd_strerror (ret)); } } + period_size = this->period_size; ERROR_CHECK (snd_pcm_hw_params_set_period_size_near (this->handle, - hw_params, &this->period_size, 0), - "error setting period size to %u frames: %s", - (guint) this->period_size); + hw_params, &period_size, 0), + "error setting period size to %u frames: %s", (guint) period_size); + if (this->period_size == 0) + this->period_size = period_size; } else { GST_INFO_OBJECT (this, "Preparing format: (none)"); } |