summaryrefslogtreecommitdiffstats
path: root/demux/codec_tags.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-19 21:39:59 +0200
committerwm4 <wm4@nowhere>2015-06-19 21:39:59 +0200
commit0641ec0525b75d0dc7aeddcccbfe4d9fab7af786 (patch)
treeae422dcf88fd6211480190d674db2ed793a5d0c9 /demux/codec_tags.c
parentaed7c848407a472ccc63337b3bd7cef97defe8e4 (diff)
downloadmpv-0641ec0525b75d0dc7aeddcccbfe4d9fab7af786.tar.bz2
mpv-0641ec0525b75d0dc7aeddcccbfe4d9fab7af786.tar.xz
demux_mkv: remove FourCCs from audio codec handling
This removes the last traces of the old MPlayer FourCC-based codec mapping code. Forcing all codec IDs through a FourCC table and then back to codec names was confusing at best, so this is a nice cleanup. Handling of PCM (non-VfW case) is redone to some degree. Handling of AC3 is moved below realaudio handling, since "A_REAL/DNET" is apparently AC3, and we must not skip realaudio-specific handling. (It seems unlikely that anything would actually break, but on the other hand I don't have any A_REAL/DNET samples for testing.) Instead of explicitly matching all the specific AAC codec names, just match them all as prefix. Some codecs don't need special handling other than their mapping entries, so they fall away (like Vorbis and Opus). The prores check in mkv_parse_and_add_packet() is not strictly related to this, but is done for consistency with the wavpack check above.
Diffstat (limited to 'demux/codec_tags.c')
-rw-r--r--demux/codec_tags.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/demux/codec_tags.c b/demux/codec_tags.c
index 2d444dbc7c..9a0e9976c7 100644
--- a/demux/codec_tags.c
+++ b/demux/codec_tags.c
@@ -22,40 +22,10 @@
#include "stheader.h"
#include "common/av_common.h"
-struct mp_codec_tag {
- uint32_t tag;
- const char *codec;
-};
-
-static const struct mp_codec_tag mp_codec_tags[] = {
- // Made-up tags used by demux_mkv.c to map codecs.
- // (This is a leftover from MPlayer's codecs.conf mechanism.)
- {MKTAG('E', 'A', 'C', '3'), "eac3"},
- {MKTAG('M', 'P', '4', 'A'), "aac"}, // also the QT tag
- {MKTAG('v', 'r', 'b', 's'), "vorbis"},
- {MKTAG('O', 'p', 'u', 's'), "opus"},
- {MKTAG('W', 'V', 'P', 'K'), "wavpack"},
- {MKTAG('T', 'R', 'H', 'D'), "truehd"},
- {MKTAG('f', 'L', 'a', 'C'), "flac"},
- {MKTAG('a', 'L', 'a', 'C'), "alac"}, // also the QT tag
- {MKTAG('2', '8', '_', '8'), "ra_288"},
- {MKTAG('a', 't', 'r', 'c'), "atrac3"},
- {MKTAG('c', 'o', 'o', 'k'), "cook"},
- {MKTAG('d', 'n', 'e', 't'), "ac3"},
- {MKTAG('s', 'i', 'p', 'r'), "sipr"},
- {MKTAG('T', 'T', 'A', '1'), "tta"},
- {0}
-};
-
#define HAVE_QT_TAGS (LIBAVFORMAT_VERSION_MICRO >= 100)
static const char *lookup_tag(int type, uint32_t tag)
{
- for (int n = 0; mp_codec_tags[n].codec; n++) {
- if (mp_codec_tags[n].tag == tag)
- return mp_codec_tags[n].codec;
- }
-
const struct AVCodecTag *av_tags[3] = {0};
switch (type) {
case STREAM_VIDEO: {