summaryrefslogtreecommitdiffstats
path: root/stream/stream_lavf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-12-11 14:35:52 +0100
committerwm4 <wm4@nowhere>2012-12-11 15:26:02 +0100
commit0fba387f72808c0298b3c34874d1388d8fd34def (patch)
tree349ca7418abb9f07d36b86c24002f25c08865e26 /stream/stream_lavf.c
parentc6fbf91a89db31081e740e77bf7c965147d4dc06 (diff)
downloadmpv-0fba387f72808c0298b3c34874d1388d8fd34def.tar.bz2
mpv-0fba387f72808c0298b3c34874d1388d8fd34def.tar.xz
Fix compilation with Libav
Doesn't define AVPROBE_SCORE_RETRY for some reason. They use AVPROBE_SCORE_MAX/4 directly internally. AV_DISPOSITION_ATTACHED_PIC is not defined with the most recent Libav release. AVIOContext.av_class exists in Libav, but is apparently disabled in old releases. Disable it for now until people stop torturing me with old crap releases.
Diffstat (limited to 'stream/stream_lavf.c')
-rw-r--r--stream/stream_lavf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c
index 4dae59c2c0..63c68b94df 100644
--- a/stream/stream_lavf.c
+++ b/stream/stream_lavf.c
@@ -140,11 +140,13 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format)
if (avio_open(&avio, filename, flags) < 0)
goto out;
+#if LIBAVFORMAT_VERSION_MICRO >= 100
if (avio->av_class) {
uint8_t *mt = NULL;
if (av_opt_get(avio, "mime_type", AV_OPT_SEARCH_CHILDREN, &mt) >= 0)
stream->mime_type = talloc_strdup(stream, mt);
}
+#endif
char *rtmp[] = {"rtmp:", "rtmpt:", "rtmpe:", "rtmpte:", "rtmps:"};
for (int i = 0; i < FF_ARRAY_ELEMS(rtmp); i++)