aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkottish <skottish97215@gmail.com>2011-07-03 15:17:44 +0200
committerMax Kellermann <max@duempel.org>2011-07-03 15:17:44 +0200
commite54748d3554d57f8320dff7390fa605bf23d7cd0 (patch)
treebdbd71f242b515e96d0c2513bf5a096256d62555
parent08e2e2e7910bcf4f0d50fae8feb4431781fc9040 (diff)
downloadmpd-e54748d3554d57f8320dff7390fa605bf23d7cd0.tar.gz
mpd-e54748d3554d57f8320dff7390fa605bf23d7cd0.tar.xz
mpd-e54748d3554d57f8320dff7390fa605bf23d7cd0.zip
decoder/ffmpeg: use AVIO_FLAG_READ on newer ffmpeg versions
FFmpeg/libav have dropped AVIO_RDONLY in favor of AVIO_FLAG_READ. This patch fixes that in MPD.
-rw-r--r--src/input/ffmpeg_input_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input/ffmpeg_input_plugin.c b/src/input/ffmpeg_input_plugin.c
index 7b729a0e5..24d80a379 100644
--- a/src/input/ffmpeg_input_plugin.c
+++ b/src/input/ffmpeg_input_plugin.c
@@ -88,7 +88,9 @@ input_ffmpeg_open(const char *uri, GError **error_r)
i = g_new(struct input_ffmpeg, 1);
input_stream_init(&i->base, &input_plugin_ffmpeg, uri);
-#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,1,0)
+ int ret = avio_open(&i->h, uri, AVIO_FLAG_READ);
+#elif LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
int ret = avio_open(&i->h, uri, AVIO_RDONLY);
#else
int ret = url_open(&i->h, uri, URL_RDONLY);