lavf/vividas: Do not increase extradata_size after allocation.

Avoids a crash in avcodec_parameters_from_context().
This commit is contained in:
Carl Eugen Hoyos 2018-12-23 00:34:57 +01:00
parent d86f698e38
commit 17aed996bc
1 changed files with 2 additions and 1 deletions

View File

@ -392,6 +392,7 @@ static void track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t
offset += data_len[j]; offset += data_len[j];
} }
if (offset < st->codecpar->extradata_size)
st->codecpar->extradata_size = offset; st->codecpar->extradata_size = offset;
} }
} }