Commit b1fe1059 authored by Max Kellermann's avatar Max Kellermann

output/Source: reset current_chunk in Open()

If the output is already open, the `current_chunk` pointer may be bogus and out of sync with `SharedPipeConsumer::chunk`, leading to an assertion failure in `SharedPipeConsumer::Consume()`. Fixes #411
parent 451b142e
...@@ -2,6 +2,8 @@ ver 0.21.2 (not yet released) ...@@ -2,6 +2,8 @@ ver 0.21.2 (not yet released)
* decoder * decoder
- ffmpeg: require FFmpeg 3.1 or later - ffmpeg: require FFmpeg 3.1 or later
- ffmpeg: fix broken sound with certain codecs - ffmpeg: fix broken sound with certain codecs
* output
- httpd: fix crash with "always_on"
ver 0.21.1 (2018/11/04) ver 0.21.1 (2018/11/04)
* protocol * protocol
......
...@@ -41,8 +41,10 @@ AudioOutputSource::Open(const AudioFormat audio_format, const MusicPipe &_pipe, ...@@ -41,8 +41,10 @@ AudioOutputSource::Open(const AudioFormat audio_format, const MusicPipe &_pipe,
{ {
assert(audio_format.IsValid()); assert(audio_format.IsValid());
if (!IsOpen() || &_pipe != &pipe.GetPipe()) if (!IsOpen() || &_pipe != &pipe.GetPipe()) {
current_chunk = nullptr;
pipe.Init(_pipe); pipe.Init(_pipe);
}
/* (re)open the filter */ /* (re)open the filter */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment