diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-09 10:51:26 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-09 10:51:26 +0000 |
commit | eaba521317f4b0f3a6aa67c8d0b5e270ad037f5c (patch) | |
tree | 4dd5f7e51f3133e9357c9c31fe5159aaee6d1744 | |
parent | abf3022f158e9c4602a6b2f9d1985c77c48f008c (diff) |
Don't change mixer if there's nothing to change. This caused a bug if the soundcard only supports one input and I cal...
Original commit message from CVS:
Don't change mixer if there's nothing to change. This caused a bug if the soundcard only supports one input and I call this function with rec=TRUE twice.
-rw-r--r-- | sys/oss/gstossmixer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/oss/gstossmixer.c b/sys/oss/gstossmixer.c index 7b904ce8..7eb2e4b6 100644 --- a/sys/oss/gstossmixer.c +++ b/sys/oss/gstossmixer.c @@ -362,6 +362,11 @@ gst_ossmixer_set_record (GstMixer *mixer, g_return_if_fail (oss->mixer_fd != -1); g_return_if_fail (gst_ossmixer_contains_track (oss, osstrack)); + /* if there's nothing to do... */ + if ((record && GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_RECORD)) || + (!record && !GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_RECORD))) + return; + /* if we're exclusive, then we need to unset the current one(s) */ if (oss->mixcaps & SOUND_CAP_EXCL_INPUT) { GList *track; |