提交 ce920f47 编写于 作者: A Andreas Rheinhardt 提交者: Michael Niedermayer

avcodec/cbs_mpeg2: Treat slices without data as invalid

They are spec-incompliant.
Signed-off-by: NAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 b1aecad9
......@@ -245,6 +245,9 @@ static int cbs_mpeg2_read_unit(CodedBitstreamContext *ctx,
if (err < 0)
return err;
if (!get_bits_left(&gbc))
return AVERROR_INVALIDDATA;
pos = get_bits_count(&gbc);
len = unit->data_size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册