mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-06 12:39:54 +00:00
Fix use after free bug in FfmpegDecoder.
This commit is contained in:
parent
042c857895
commit
0497260ddb
@ -251,6 +251,10 @@ void FfmpegDecoder::Reset() {
|
||||
av_audio_fifo_free(this->outputFifo);
|
||||
this->outputFifo = nullptr;
|
||||
}
|
||||
if (this->resampler) {
|
||||
swr_free(&this->resampler);
|
||||
this->resampler = nullptr;
|
||||
}
|
||||
this->streamId = -1;
|
||||
}
|
||||
|
||||
@ -479,9 +483,6 @@ bool FfmpegDecoder::DrainResamplerToFifoQueue() {
|
||||
}
|
||||
}
|
||||
|
||||
swr_free(&this->resampler);
|
||||
this->resampler = nullptr;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user