Commit 219c4252 authored by Max Kellermann's avatar Max Kellermann

decoder/ffmpeg: pass MIME type to ffmpeg/libav version 11

That attribute was uninitialized before, which could crash libavformat. See Debian bug 760669
parent e3a0f158
......@@ -3,6 +3,7 @@ ver 0.18.14 (not yet released)
- fix range parser bug on certain 32 bit architectures
* decoder
- audiofile: fix crash after seeking
- ffmpeg: fix crash with ffmpeg/libav version 11
- fix assertion failure after seeking
ver 0.18.13 (2014/08/31)
......
......@@ -387,6 +387,13 @@ ffmpeg_probe(Decoder *decoder, InputStream &is)
avpd.buf_size = nbytes;
avpd.filename = is.uri.c_str();
#ifdef AVPROBE_SCORE_MIME
/* this attribute was added in libav/ffmpeg version 11, but
unfortunately it's "uint8_t" instead of "char", and it's
not "const" - wtf? */
avpd.mime_type = (uint8_t *)const_cast<char *>(is.GetMimeType());
#endif
return av_probe_input_format(&avpd, true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment