demux_mkv: fix undefined behavior

With some files, the extradata variable can remain uninitialized, but
will be used for memory access.

CC: @mpv-player/stable (with high priority)
This commit is contained in:
wm4 2014-10-13 16:42:00 +02:00 committed by Alessandro Ghedini
parent 7d9f8f75ea
commit a6eb0714fa
1 changed files with 1 additions and 1 deletions

View File

@ -1149,7 +1149,7 @@ static const videocodec_info_t vinfo[] = {
static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track)
{
unsigned char *extradata;
unsigned char *extradata = NULL;
unsigned int extradata_size = 0;
bool raw = false;
struct sh_stream *sh = new_sh_stream(demuxer, STREAM_VIDEO);