mirror of https://github.com/mpv-player/mpv
demux_mkv: always set track->codec_id to a string
Otherwise audio/video/sub track handling code would dereference the NULL pointer.
This commit is contained in:
parent
6627cf81cc
commit
963c9aa3d5
|
@ -602,8 +602,10 @@ static void parse_trackentry(struct demuxer *demuxer,
|
||||||
track->ms_compat = 1;
|
track->ms_compat = 1;
|
||||||
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] | + Codec ID: %s\n",
|
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] | + Codec ID: %s\n",
|
||||||
track->codec_id);
|
track->codec_id);
|
||||||
} else
|
} else {
|
||||||
mp_msg(MSGT_DEMUX, MSGL_ERR, "[mkv] Missing codec ID!\n");
|
mp_msg(MSGT_DEMUX, MSGL_ERR, "[mkv] Missing codec ID!\n");
|
||||||
|
track->codec_id = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (entry->n_codec_private) {
|
if (entry->n_codec_private) {
|
||||||
int len = entry->codec_private.len;
|
int len = entry->codec_private.len;
|
||||||
|
|
Loading…
Reference in New Issue