changeset 11878:10fb7a24b4fb

fix some 10ls in sample rate handlin patch by Josef Zlomek <josef.zlomek@email.cz>
author attila
date Thu, 29 Jan 2004 12:43:54 +0000
parents 9b2035d703da
children 205d12acbb5f
files libmpdemux/ai_oss.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/ai_oss.c	Thu Jan 29 12:11:13 2004 +0000
+++ b/libmpdemux/ai_oss.c	Thu Jan 29 12:43:54 2004 +0000
@@ -46,6 +46,7 @@
 		   ai->req_channels);
 	    return -1;
 	}
+	ai->channels = ioctl_param;
     }
     else
     {
@@ -58,8 +59,8 @@
 		   ai->req_channels == 2);
 	    return -1;
 	}
+	ai->channels = ioctl_param ? 2 : 1;
     }
-    ai->channels = ai->req_channels;
     return 0;
 }
 
@@ -102,7 +103,7 @@
 	       ai->req_samplerate);
 	return -1;
     }
-    ai->samplerate = ai->req_samplerate;
+    ai->samplerate = ioctl_param;
 
     mp_msg(MSGT_TV, MSGL_V, "ioctl dsp trigger: %d\n",
 	   ioctl(ai->oss.audio_fd, SNDCTL_DSP_GETTRIGGER, &ioctl_param));