[pulseaudio-commits] r1449 - in /trunk/src/pulse: sample.c sample.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Wed May 23 09:57:36 PDT 2007


Author: lennart
Date: Wed May 23 18:57:35 2007
New Revision: 1449

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1449&root=3Dpulseaudio&vi=
ew=3Drev
Log:
don't allow excessively high sample rates

Modified:
    trunk/src/pulse/sample.c
    trunk/src/pulse/sample.h

Modified: trunk/src/pulse/sample.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/sample.c?rev=3D=
1449&root=3Dpulseaudio&r1=3D1448&r2=3D1449&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/pulse/sample.c (original)
+++ trunk/src/pulse/sample.c Wed May 23 18:57:35 2007
@@ -80,6 +80,7 @@
     assert(spec);
 =

     if (spec->rate <=3D 0 ||
+        spec->rate > PA_RATE_MAX ||
         spec->channels <=3D 0 ||
         spec->channels > PA_CHANNELS_MAX ||
         spec->format >=3D PA_SAMPLE_MAX ||

Modified: trunk/src/pulse/sample.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/sample.h?rev=3D=
1449&root=3Dpulseaudio&r1=3D1448&r2=3D1449&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/pulse/sample.h (original)
+++ trunk/src/pulse/sample.h Wed May 23 18:57:35 2007
@@ -105,6 +105,9 @@
 /** Maximum number of allowed channels */
 #define PA_CHANNELS_MAX 32
 =

+/** Maximum allowed sample rate */
+#define PA_RATE_MAX (48000*4)
+
 /** Sample format */
 typedef enum pa_sample_format {
     PA_SAMPLE_U8,              /**< Unsigned 8 Bit PCM */




More information about the pulseaudio-commits mailing list