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
This commit is contained in:
@@ -41,8 +41,10 @@ AudioOutputSource::Open(const AudioFormat audio_format, const MusicPipe &_pipe,
|
||||
{
|
||||
assert(audio_format.IsValid());
|
||||
|
||||
if (!IsOpen() || &_pipe != &pipe.GetPipe())
|
||||
if (!IsOpen() || &_pipe != &pipe.GetPipe()) {
|
||||
current_chunk = nullptr;
|
||||
pipe.Init(_pipe);
|
||||
}
|
||||
|
||||
/* (re)open the filter */
|
||||
|
||||
|
Reference in New Issue
Block a user