summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-16 10:04:46 +0100
committerwm4 <wm4@nowhere>2014-03-16 13:19:28 +0100
commit64c01a814c8f7cf4a780b89fe00ed608b1f93e2b (patch)
tree00d3a7f8b6110cdc60da2bebb99f76de46696b95 /audio
parent5506c8d0f6450133d33e940fcdeaecc25564092a (diff)
downloadmpv-64c01a814c8f7cf4a780b89fe00ed608b1f93e2b.tar.bz2
mpv-64c01a814c8f7cf4a780b89fe00ed608b1f93e2b.tar.xz
Remove some more unneeded version checks
All of these check against things that happened before the latest supported FFmpeg/Libav release.
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af_lavfi.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/audio/filter/af_lavfi.c b/audio/filter/af_lavfi.c
index 4049e54021..73d093d095 100644
--- a/audio/filter/af_lavfi.c
+++ b/audio/filter/af_lavfi.c
@@ -41,11 +41,9 @@
#include "options/m_option.h"
#include "common/av_opts.h"
-#define IS_LIBAV_FORK (LIBAVFILTER_VERSION_MICRO < 100)
-
// FFmpeg and Libav have slightly different APIs, just enough to cause us
// unnecessary pain. <Expletive deleted.>
-#if IS_LIBAV_FORK
+#if LIBAVFILTER_VERSION_MICRO < 100
#define graph_parse(graph, filters, inputs, outputs, log_ctx) \
avfilter_graph_parse(graph, filters, inputs, outputs, log_ctx)
#else
@@ -53,14 +51,6 @@
avfilter_graph_parse(graph, filters, &(inputs), &(outputs), log_ctx)
#endif
-// ":" is deprecated, but "|" doesn't work in earlier versions.
-#if (IS_LIBAV_FORK && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3, 7, 0)) || \
- (!IS_LIBAV_FORK && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3, 50, 100))
-#define FMTSEP "|"
-#else
-#define FMTSEP ":"
-#endif
-
struct priv {
AVFilterGraph *graph;
AVFilterContext *in;
@@ -124,7 +114,7 @@ static bool recreate_graph(struct af_instance *af, struct mp_audio *config)
for (int n = 0; sample_fmts[n] != AV_SAMPLE_FMT_NONE; n++) {
const char *name = av_get_sample_fmt_name(sample_fmts[n]);
if (name) {
- const char *s = fmtstr[0] ? FMTSEP : "";
+ const char *s = fmtstr[0] ? "|" : "";
fmtstr = talloc_asprintf_append_buffer(fmtstr, "%s%s", s, name);
}
}
@@ -238,7 +228,7 @@ static int filter(struct af_instance *af, struct mp_audio *data, int flags)
frame->channel_layout = l_in->channel_layout;
frame->sample_rate = l_in->sample_rate;
-#if !IS_LIBAV_FORK
+#if LIBAVFILTER_VERSION_MICRO >= 100
// FFmpeg being a stupid POS
frame->channels = l_in->channels;
#endif