From 58a2d25be7a5bc7d83dacdfa107b5150a7ce5d84 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 27 Oct 2005 11:00:40 +0000 Subject: [PATCH] sys/oss/gstosssrc.c: Set correct format on oss instead of a silly value. Original commit message from CVS: * sys/oss/gstosssrc.c: (gst_oss_src_prepare): Set correct format on oss instead of a silly value. --- ChangeLog | 5 +++++ sys/oss/gstosssrc.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53af601751..673ca1b1dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-27 Wim Taymans + + * sys/oss/gstosssrc.c: (gst_oss_src_prepare): + Set correct format on oss instead of a silly value. + 2005-10-27 Julien MOUTTE * gst/videobox/gstvideobox.c: (gst_video_box_class_init), diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index fd9f2cc3bd..37f26938bd 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -359,7 +359,7 @@ gst_oss_src_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) GstOssSrc *oss; struct audio_buf_info info; int mode; - int tmp; + int fmt, tmp; oss = GST_OSS_SRC (asrc); @@ -368,8 +368,8 @@ gst_oss_src_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) if (fcntl (oss->fd, F_SETFL, mode) == -1) goto non_block; - tmp = gst_oss_src_get_format (spec->format); - if (tmp == 0) + fmt = gst_oss_src_get_format (spec->format); + if (fmt == 0) goto wrong_format; tmp = ilog2 (spec->segsize); @@ -381,7 +381,7 @@ gst_oss_src_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) SET_PARAM (oss, SNDCTL_DSP_RESET, 0); - SET_PARAM (oss, SNDCTL_DSP_SETFMT, tmp); + SET_PARAM (oss, SNDCTL_DSP_SETFMT, fmt); if (spec->channels == 2) SET_PARAM (oss, SNDCTL_DSP_STEREO, 1); SET_PARAM (oss, SNDCTL_DSP_CHANNELS, spec->channels);