24 lines
700 B
Diff
24 lines
700 B
Diff
index 2debbcd..72e7fcf 100644
|
|
--- a/modules/audio_output/pulse.c
|
|
+++ b/modules/audio_output/pulse.c
|
|
@@ -472,8 +472,17 @@ static void stream_underflow_cb(pa_stream *s, void *userdata)
|
|
{
|
|
+ uint32_t rate = pa_stream_get_sample_spec(s)->rate;
|
|
audio_output_t *aout = userdata;
|
|
|
|
- msg_Dbg(aout, "underflow");
|
|
- (void) s;
|
|
+ msg_Warn(aout, "underflow");
|
|
+ stream_stop(s, aout);
|
|
+
|
|
+ aout_sys_t *sys = aout->sys;
|
|
+ sys->first_pts = VLC_TS_INVALID;
|
|
+
|
|
+ pa_operation *op = pa_stream_update_sample_rate(s, rate, NULL, NULL);
|
|
+ if (unlikely(op == NULL))
|
|
+ return;
|
|
+ pa_operation_unref(op);
|
|
}
|
|
|
|
static int stream_wait(pa_stream *stream, pa_threaded_mainloop *mainloop)
|