diff options
author | wm4 <wm4@nowhere> | 2015-06-13 22:08:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-13 22:34:23 +0200 |
commit | 725d840b7329fb00dfe4b1de82ac1ab570506c59 (patch) | |
tree | 3acdd36681d90e7b6b7f03a1c3f4d85d55996e27 /demux/demux_mkv.c | |
parent | d50e01d0c62a31d6b4549abbfac031b680f89cf8 (diff) | |
download | mpv-725d840b7329fb00dfe4b1de82ac1ab570506c59.tar.bz2 mpv-725d840b7329fb00dfe4b1de82ac1ab570506c59.tar.xz |
demux_mkv: always copy video extradata
The existing code avoided doing this for some codecs. I see no point in
this, and it seems the original reason this exists was due to some
cleanup in 2007. libavformat doesn't do this. So just drop it.
Diffstat (limited to 'demux/demux_mkv.c')
-rw-r--r-- | demux/demux_mkv.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index b9c9d9e74c..9432be8567 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1195,23 +1195,22 @@ static void display_create_tracks(demuxer_t *demuxer) typedef struct { char *id; const char *codec; - int extradata; } videocodec_info_t; static const videocodec_info_t vinfo[] = { - {MKV_V_MJPEG, "mjpeg", 1}, - {MKV_V_MPEG1, "mpeg1video", 0}, - {MKV_V_MPEG2, "mpeg2video", 0}, - {MKV_V_MPEG4_SP, "mpeg4", 1}, - {MKV_V_MPEG4_ASP, "mpeg4", 1}, - {MKV_V_MPEG4_AP, "mpeg4", 1}, - {MKV_V_MPEG4_AVC, "h264", 1}, - {MKV_V_THEORA, "theora", 1}, - {MKV_V_VP8, "vp8", 0}, - {MKV_V_VP9, "vp9", 0}, - {MKV_V_DIRAC, "dirac", 0}, - {MKV_V_PRORES, "prores", 0}, - {MKV_V_HEVC, "hevc", 1}, + {MKV_V_MJPEG, "mjpeg"}, + {MKV_V_MPEG1, "mpeg1video"}, + {MKV_V_MPEG2, "mpeg2video"}, + {MKV_V_MPEG4_SP, "mpeg4"}, + {MKV_V_MPEG4_ASP, "mpeg4"}, + {MKV_V_MPEG4_AP, "mpeg4"}, + {MKV_V_MPEG4_AVC, "h264"}, + {MKV_V_THEORA, "theora"}, + {MKV_V_VP8, "vp8"}, + {MKV_V_VP9, "vp9"}, + {MKV_V_DIRAC, "dirac"}, + {MKV_V_PRORES, "prores"}, + {MKV_V_HEVC, "hevc"}, {0} }; @@ -1293,8 +1292,7 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track) vi++; if (vi->codec) sh->codec = vi->codec; - if (vi->extradata && track->private_data && track->private_size > 0) - { + if (track->private_data && track->private_size > 0) { extradata = track->private_data; extradata_size = track->private_size; } |