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