diff options
author | wm4 <wm4@nowhere> | 2014-04-26 22:24:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-26 22:24:15 +0200 |
commit | eb3cc32f9be3c589a43c43dcd2d5bed73db75c86 (patch) | |
tree | d062a7c8d35a2c914f0831fe5347239b9c70cce3 /demux | |
parent | a29597cb65dbaf079019d582db31382f42bb7106 (diff) | |
download | mpv-eb3cc32f9be3c589a43c43dcd2d5bed73db75c86.tar.bz2 mpv-eb3cc32f9be3c589a43c43dcd2d5bed73db75c86.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.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index d9dc874bc9..20864aa297 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1127,6 +1127,7 @@ typedef struct { char *id; int fourcc; int extradata; + bool parse; } videocodec_info_t; static const videocodec_info_t vinfo[] = { @@ -1139,11 +1140,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) @@ -1227,6 +1228,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" |