summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-16 15:14:55 +0100
committerwm4 <wm4@nowhere>2020-02-16 15:14:55 +0100
commit7d11eda72e90d7aa9df25127bd810aa7b191029c (patch)
tree5c474862236dc62d136fe44dfdf3737bc808b829 /demux
parenta4eb8f75c0644ce5cf7c0bcea6b3efd2a886027d (diff)
downloadmpv-7d11eda72e90d7aa9df25127bd810aa7b191029c.tar.bz2
mpv-7d11eda72e90d7aa9df25127bd810aa7b191029c.tar.xz
Remove remains of Libav compatibility
Libav seems rather dead: no release for 2 years, no new git commits in master for almost a year (with one exception ~6 months ago). From what I can tell, some developers resigned themselves to the horrifying idea to post patches to ffmpeg-devel instead, while the rest of the developers went on to greener pastures. Libav was a better project than FFmpeg. Unfortunately, FFmpeg won, because it managed to keep the name and website. Libav was pushed more and more into obscurity: while there was initially a big push for Libav, FFmpeg just remained "in place" and visible for most people. FFmpeg was slowly draining all manpower and energy from Libav. A big part of this was that FFmpeg stole code from Libav (regular merges of the entire Libav git tree), making it some sort of Frankenstein mirror of Libav, think decaying zombie with additional legs ("features") nailed to it. "Stealing" surely is the wrong word; I'm just aping the language that some of the FFmpeg members used to use. All that is in the past now, I'm probably the only person left who is annoyed by this, and with this commit I'm putting this decade long problem finally to an end. I just thought I'd express my annoyance about this fucking shitshow one last time. The most intrusive change in this commit is the resample filter, which originally used libavresample. Since the FFmpeg developer refused to enable libavresample by default for drama reasons, and the API was slightly different, so the filter used some big preprocessor mess to make it compatible to libswresample. All that falls away now. The simplification to the build system is also significant.
Diffstat (limited to 'demux')
-rw-r--r--demux/codec_tags.c6
-rw-r--r--demux/demux_lavf.c2
-rw-r--r--demux/packet.c4
3 files changed, 0 insertions, 12 deletions
diff --git a/demux/codec_tags.c b/demux/codec_tags.c
index ea6c8fe19d..8f8c97ec38 100644
--- a/demux/codec_tags.c
+++ b/demux/codec_tags.c
@@ -24,24 +24,18 @@
#include "stheader.h"
#include "common/av_common.h"
-#define HAVE_QT_TAGS (LIBAVFORMAT_VERSION_MICRO >= 100)
-
static const char *lookup_tag(int type, uint32_t tag)
{
const struct AVCodecTag *av_tags[3] = {0};
switch (type) {
case STREAM_VIDEO: {
av_tags[0] = avformat_get_riff_video_tags();
-#if HAVE_QT_TAGS
av_tags[1] = avformat_get_mov_video_tags();
-#endif
break;
}
case STREAM_AUDIO: {
av_tags[0] = avformat_get_riff_audio_tags();
-#if HAVE_QT_TAGS
av_tags[1] = avformat_get_mov_audio_tags();
-#endif
break;
}
}
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index c2f6a65395..f4bbfc5739 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -1161,10 +1161,8 @@ static bool demux_lavf_read_packet(struct demuxer *demux,
dp->duration = pkt->duration * av_q2d(st->time_base);
dp->pos = pkt->pos;
dp->keyframe = pkt->flags & AV_PKT_FLAG_KEY;
-#if LIBAVFORMAT_VERSION_MICRO >= 100
if (pkt->flags & AV_PKT_FLAG_DISCARD)
MP_ERR(demux, "Edit lists are not correctly supported (FFmpeg issue).\n");
-#endif
av_packet_unref(pkt);
if (priv->format_hack.clear_filepos)
diff --git a/demux/packet.c b/demux/packet.c
index de47c28dbc..1a460b0ccb 100644
--- a/demux/packet.c
+++ b/demux/packet.c
@@ -198,7 +198,6 @@ size_t demux_packet_estimate_total_size(struct demux_packet *dp)
int demux_packet_set_padding(struct demux_packet *dp, int start, int end)
{
-#if LIBAVCODEC_VERSION_MICRO >= 100
if (!start && !end)
return 0;
if (!dp->avpacket)
@@ -209,14 +208,12 @@ int demux_packet_set_padding(struct demux_packet *dp, int start, int end)
AV_WL32(p + 0, start);
AV_WL32(p + 4, end);
-#endif
return 0;
}
int demux_packet_add_blockadditional(struct demux_packet *dp, uint64_t id,
void *data, size_t size)
{
-#if LIBAVCODEC_VERSION_MICRO >= 100
if (!dp->avpacket)
return -1;
uint8_t *sd = av_packet_new_side_data(dp->avpacket,
@@ -227,6 +224,5 @@ int demux_packet_add_blockadditional(struct demux_packet *dp, uint64_t id,
AV_WB64(sd, id);
if (size > 0)
memcpy(sd + 8, data, size);
-#endif
return 0;
}