From 64c01a814c8f7cf4a780b89fe00ed608b1f93e2b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 16 Mar 2014 10:04:46 +0100 Subject: Remove some more unneeded version checks All of these check against things that happened before the latest supported FFmpeg/Libav release. --- stream/stream_lavf.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'stream') diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index 3c7bf93493..ec46c862f6 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -119,15 +119,6 @@ static int control(stream_t *s, int cmd, void *arg) return STREAM_UNSUPPORTED; } -static bool mp_avio_has_opts(AVIOContext *avio) -{ -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 0, 0) - return avio->av_class != NULL; -#else - return false; -#endif -} - static const char * const prefix[] = { "lavf://", "ffmpeg://" }; static int open_f(stream_t *stream, int mode) @@ -223,7 +214,7 @@ static int open_f(stream_t *stream, int mode) t->key, t->value); } - if (mp_avio_has_opts(avio)) { + 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); @@ -270,7 +261,7 @@ static char **read_icy(stream_t *s) { AVIOContext *avio = s->priv; - if (!mp_avio_has_opts(avio)) + if (!avio->av_class) return NULL; uint8_t *icy_header = NULL; -- cgit v1.2.3