summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-26 22:24:15 +0200
committerwm4 <wm4@nowhere>2014-04-30 11:45:31 +0200
commit619fa761af4f13b1ceb05876b4953f4afd554729 (patch)
treed39724c7368fefe880b6e09bbdf12329e316e824
parent717d729dcbcd06f396b170d9d4c08f76d390f89d (diff)
downloadmpv-619fa761af4f13b1ceb05876b4953f4afd554729.tar.bz2
mpv-619fa761af4f13b1ceb05876b4953f4afd554729.tar.xz
demux_mkv: enable parsing for VP9
VP9 packets can contain 2 frames in some video packets (from which 1 frame is invisible). Due to a design mismatch between libvpx and the libavcodec vp9 decoder, libvpx can take the "full" packets, but lavc vp9 can not. The consequence is that we have to split the packets if we want to feed them to the lavc codec. This is not entirely correct yet: timestamp handling is missing. --demuxer=lavf and ffmpeg native utilities have the same problem. We can fix this only once the ffmpeg VP9 parser is fixed.
-rw-r--r--demux/demux_mkv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index b3a106e763..8076393cbe 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -1173,6 +1173,7 @@ typedef struct {
char *id;
int fourcc;
int extradata;
+ bool parse;
} videocodec_info_t;
static const videocodec_info_t vinfo[] = {
@@ -1185,11 +1186,11 @@ static const videocodec_info_t vinfo[] = {
{MKV_V_MPEG4_AVC, MP_FOURCC('a', 'v', 'c', '1'), 1},
{MKV_V_THEORA, MP_FOURCC('t', 'h', 'e', 'o'), 1},
{MKV_V_VP8, MP_FOURCC('V', 'P', '8', '0'), 0},
- {MKV_V_VP9, MP_FOURCC('V', 'P', '9', '0'), 0},
+ {MKV_V_VP9, MP_FOURCC('V', 'P', '9', '0'), 0, true},
{MKV_V_DIRAC, MP_FOURCC('d', 'r', 'a', 'c'), 0},
{MKV_V_PRORES, MP_FOURCC('p', 'r', '0', '0'), 0},
{MKV_V_HEVC, MP_FOURCC('H', 'E', 'V', 'C'), 1},
- {NULL, 0, 0}
+ {0}
};
static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track)
@@ -1273,6 +1274,7 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track)
extradata = track->private_data;
extradata_size = track->private_size;
}
+ track->parse = vi->parse;
if (!vi->id) {
MP_WARN(demuxer, "Unknown/unsupported "
"CodecID (%s) or missing/bad CodecPrivate\n"