]> code.delx.au - pulseaudio/commitdiff
make sure we send a started messages when we are uncorking
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Oct 2008 00:26:08 +0000 (02:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 6 Oct 2008 00:26:08 +0000 (02:26 +0200)
src/pulsecore/protocol-native.c
src/pulsecore/sink-input.c

index 5c6dbf44d44206939b6ec1e1e188c7ee0676aae8..778aab57938e81ae475c5e89c387b99c43f16267 100644 (file)
@@ -3168,6 +3168,10 @@ static void command_cork_playback_stream(pa_pdispatch *pd, uint32_t command, uin
     CHECK_VALIDITY(c->pstream, playback_stream_isinstance(s), tag, PA_ERR_NOENTITY);
 
     pa_sink_input_cork(s->sink_input, b);
+
+    if (b)
+        s->is_underrun = TRUE;
+
     pa_pstream_send_simple_ack(c->pstream, tag);
 }
 
index 326a7e2ce1651c6ace61eacffff0701805e99848..4f70347fdd5b5ecb6efe3ef64ac956315e73dddc 100644 (file)
@@ -1030,6 +1030,9 @@ void pa_sink_input_set_state_within_thread(pa_sink_input *i, pa_sink_input_state
 
     } else if (uncorking) {
 
+        i->thread_info.underrun_for = (uint64_t) -1;
+        i->thread_info.playing_for = 0;
+
         pa_log_debug("Requesting rewind due to uncorking");
 
         /* OK, we're being uncorked. Make sure we're not rewound when