summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-14 18:46:24 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-14 18:46:24 +0000
commit1f0a52dad1515e4aa7c9f45541faaa03a88aa13a (patch)
tree9e65783bac8b51163495df89303033d12d2d7c6c
parent68e4a93705117e14e28fa919873a239e907c73d8 (diff)
the pointer to rewind() may actually be NULL
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2267 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/sink-input.c5
-rw-r--r--src/pulsecore/sink-input.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 2d0ba449..01e3bd9c 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -399,7 +399,6 @@ void pa_sink_input_put(pa_sink_input *i) {
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 @@ void pa_sink_input_rewind(pa_sink_input *i, size_t nbytes /* in sink sample spec
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 @@ void pa_sink_input_rewind(pa_sink_input *i, size_t nbytes /* in sink sample spec
}
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;
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index 62464ca2..8545dea3 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -103,7 +103,7 @@ struct pa_sink_input {
* 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. */