[pulseaudio-commits] r1515 - /branches/lennart/src/pulsecore/resampler.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Jul 13 05:13:25 PDT 2007


Author: lennart
Date: Fri Jul 13 14:13:25 2007
New Revision: 1515

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1515&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Remove a superfluous pa_memblock_release(); properly handle buf4 allocation

Modified:
    branches/lennart/src/pulsecore/resampler.c

Modified: branches/lennart/src/pulsecore/resampler.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
resampler.c?rev=3D1515&root=3Dpulseaudio&r1=3D1514&r2=3D1515&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
--- branches/lennart/src/pulsecore/resampler.c (original)
+++ branches/lennart/src/pulsecore/resampler.c Fri Jul 13 14:13:25 2007
@@ -455,7 +455,7 @@
     n_frames =3D input->length / sizeof(float) / r->o_ss.channels;
     n_samples =3D n_frames * r->o_ss.channels;
 =

-    if (u->buf4_samples < n_samples) {
+    if (!u->buf4.memblock || u->buf4_samples < n_samples) {
         if (u->buf4.memblock)
             pa_memblock_unref(u->buf4.memblock);
 =

@@ -503,9 +503,6 @@
             pa_memchunk_reset(buf);
     } else
         pa_memchunk_reset(out);
-
-    pa_memblock_release(in->memblock);
-
 }
 =

 static void libsamplerate_update_input_rate(pa_resampler *r, uint32_t rate=
) {
@@ -526,7 +523,6 @@
     }
 }
 =

-
 static void libsamplerate_update_output_rate(pa_resampler *r, uint32_t rat=
e) {
     struct impl_libsamplerate *u;
 =





More information about the pulseaudio-commits mailing list