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:
parent
f61a5f5200
commit
7146f825b2
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
|||
ver 0.19.20 (not yet released)
|
||||
* decoder
|
||||
- ffmpeg: fix crash bug
|
||||
|
||||
ver 0.19.20 (2016/12/09)
|
||||
* protocol
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue