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:
parent
451b142e3a
commit
b1fe105904
2
NEWS
2
NEWS
|
@ -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,
|
||||||
{
|
{
|
||||||
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 */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue