decoder/ffmpeg: fix crash due to wrong avio_alloc_context() call

Allocate the buffer dynamically using av_malloc(), and free
AVIOContext.buffer in the destructor, as mandated by the libavformat
documentation.

Fixes http://bugs.musicpd.org/view.php?id=4446
This commit is contained in:
Max Kellermann
2015-10-26 13:06:29 +01:00
parent a7ee64a25b
commit 1958f78cc1
2 changed files with 15 additions and 4 deletions

2
NEWS
View File

@@ -1,6 +1,8 @@
ver 0.19.11 (not yet released)
* tags
- ape: fix buffer overflow
* decoder
- ffmpeg: fix crash due to wrong avio_alloc_context() call
* encoder
- flac: fix crash with 32 bit playback