aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-12-23 00:34:57 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-12-28 00:20:41 +0100
commit17aed996bc35a020416e10075f1e6cc61b6cf805 (patch)
tree14c866e64146a7445cbc0f61fb3bf42edf1cb9e1
parentd86f698e386431e589c0085ecff959a2baa4b8ef (diff)
downloadffmpeg-17aed996bc35a020416e10075f1e6cc61b6cf805.tar.gz
lavf/vividas: Do not increase extradata_size after allocation.
Avoids a crash in avcodec_parameters_from_context().
-rw-r--r--libavformat/vividas.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index e199b05d69..00a1a0f6ef 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -392,7 +392,8 @@ static void track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t
offset += data_len[j];
}
- st->codecpar->extradata_size = offset;
+ if (offset < st->codecpar->extradata_size)
+ st->codecpar->extradata_size = offset;
}
}