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.
This commit is contained in:
wm4 2014-04-26 22:24:15 +02:00
parent 717d729dcb
commit 619fa761af
1 changed files with 4 additions and 2 deletions

View File

@ -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"