decoder/ffmpeg: fix double free bug
From the avformat_open_input() API documentation: "Note that a user-supplied AVFormatContext will be freed on failure." https://bugs.musicpd.org/view.php?id=4607
This commit is contained in:
@@ -71,7 +71,6 @@ FfmpegOpenInput(AVIOContext *pb,
|
||||
|
||||
int err = avformat_open_input(&context, filename, fmt, nullptr);
|
||||
if (err < 0) {
|
||||
avformat_free_context(context);
|
||||
SetFfmpegError(error, err, "avformat_open_input() failed");
|
||||
return nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user