From 619fa761af4f13b1ceb05876b4953f4afd554729 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 26 Apr 2014 22:24:15 +0200 Subject: 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. --- demux/demux_mkv.c | 6 ++++-- 1 file 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" -- cgit v1.2.3