[pulseaudio-commits] r2267 - in /branches/glitch-free/src/pulsecore: sink-input.c sink-input.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Apr 14 11:46:25 PDT 2008


Author: lennart
Date: Mon Apr 14 20:46:24 2008
New Revision: 2267

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2267&root=pulseaudio&view=rev
Log:
the pointer to rewind() may actually be NULL

Modified:
    branches/glitch-free/src/pulsecore/sink-input.c
    branches/glitch-free/src/pulsecore/sink-input.h

Modified: branches/glitch-free/src/pulsecore/sink-input.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sink-input.c?rev=2267&root=pulseaudio&r1=2266&r2=2267&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sink-input.c (original)
+++ branches/glitch-free/src/pulsecore/sink-input.c Mon Apr 14 20:46:24 2008
@@ -399,7 +399,6 @@
 
     pa_assert(i->state == PA_SINK_INPUT_INIT);
     pa_assert(i->pop);
-    pa_assert(i->rewind);
 
     i->thread_info.state = i->state = i->flags & PA_SINK_INPUT_START_CORKED ? PA_SINK_INPUT_CORKED : PA_SINK_INPUT_RUNNING;
     i->thread_info.volume = i->volume;
@@ -611,7 +610,7 @@
     pa_assert(PA_SINK_INPUT_LINKED(i->thread_info.state));
     pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
 
-    pa_log_debug("rewind(%u, %u)", nbytes, i->thread_info.rewrite_nbytes);
+    pa_log_debug("rewind(%lu, %lu)", (unsigned long) nbytes, (unsigned long) i->thread_info.rewrite_nbytes);
 
     if (i->thread_info.state == PA_SINK_INPUT_CORKED)
         return;
@@ -623,7 +622,7 @@
     }
 
     if (nbytes > 0)
-        pa_log_debug("Have to rewind %u bytes.", nbytes);
+        pa_log_debug("Have to rewind %lu bytes.", (unsigned long) nbytes);
 
     if (i->thread_info.rewrite_nbytes > 0) {
         size_t max_rewrite;

Modified: branches/glitch-free/src/pulsecore/sink-input.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sink-input.h?rev=2267&root=pulseaudio&r1=2266&r2=2267&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sink-input.h (original)
+++ branches/glitch-free/src/pulsecore/sink-input.h Mon Apr 14 20:46:24 2008
@@ -103,7 +103,7 @@
      * before peek() if it is called at all. Only called if the sink
      * input driver ever plans to call
      * pa_sink_input_request_rewrite(). Called from IO context. */
-    void (*rewind) (pa_sink_input *i, size_t nbytes);
+    void (*rewind) (pa_sink_input *i, size_t nbytes);     /* may be NULL */
 
     /* Called whenever the maximum rewindable size of the sink
      * changes. Called from UI context. */




More information about the pulseaudio-commits mailing list