summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2010-11-08 17:02:42 +0100
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-13 22:02:26 +0200
commit91ea30c58587af0929b7dea42ff238d70e78a9bc (patch)
treefcd09fcc527493c0f12c4f3402a7fa787862f861 /libmpdemux
parenta4ce95de811698503075a5f0b513e595f11f97a4 (diff)
downloadmpv-91ea30c58587af0929b7dea42ff238d70e78a9bc.tar.bz2
mpv-91ea30c58587af0929b7dea42ff238d70e78a9bc.tar.xz
demux_lavf: use lavf for all formats except those listed
lavf demuxers are mostly better and receive more maintenance, therefore it makes sense to prefer them in most cases. Change the "preferred" logic from listing all formats for which lavf is preferred to listing exceptions for which it isn't. Currently there are 3 exceptions: Matroska, FLAC and RealMedia (.rm).
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_lavf.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index 381b6a17db..14869be61d 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -229,21 +229,15 @@ static bool matches_avinputformat_name(struct lavf_priv *priv,
}
}
-static const char * const preferred_list[] = {
- "dxa",
- "flv",
- "gxf",
- "nut",
- "nuv",
- "mov", "mp4", // "mov,mp4,m4a,3gp,3g2,mj2" is one AVInputFormat
- "mpc",
- "mpc8",
- "mxf",
- "ogg",
- "swf",
- "vqf",
- "w64",
- "wv",
+/* formats for which an internal demuxer is preferred */
+static const char * const preferred_internal[] = {
+ /* lavf Matroska demuxer doesn't support ordered chapters and fails
+ * for more files */
+ "matroska",
+ /* seeking won't work in lavf FLAC demuxer until a parser is committed */
+ "flac",
+ /* lavf gives neither pts nor dts for some video frames in .rm */
+ "rm",
NULL
};
@@ -251,11 +245,11 @@ static int lavf_check_preferred_file(demuxer_t *demuxer){
if (lavf_check_file(demuxer)) {
const char * const *p;
lavf_priv_t *priv = demuxer->priv;
- for (p = preferred_list; *p; p++)
+ for (p = preferred_internal; *p; p++)
if (matches_avinputformat_name(priv, *p))
- return DEMUXER_TYPE_LAVF_PREFERRED;
+ return 0;
}
- return 0;
+ return DEMUXER_TYPE_LAVF_PREFERRED;
}
static uint8_t char2int(char c) {