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:
wm4 2013-04-20 23:40:41 +02:00
parent 6627cf81cc
commit 963c9aa3d5
1 changed files with 3 additions and 1 deletions

View File

@ -602,8 +602,10 @@ static void parse_trackentry(struct demuxer *demuxer,
track->ms_compat = 1;
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] | + Codec ID: %s\n",
track->codec_id);
} else
} else {
mp_msg(MSGT_DEMUX, MSGL_ERR, "[mkv] Missing codec ID!\n");
track->codec_id = "";
}
if (entry->n_codec_private) {
int len = entry->codec_private.len;