Commit 9f03b850 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/parser: assert that the codec id is not NONE in av_parser_parse2()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b6b4b0a6
......@@ -141,6 +141,8 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx,
int index, i;
uint8_t dummy_buf[AV_INPUT_BUFFER_PADDING_SIZE];
av_assert1(avctx->codec_id != AV_CODEC_ID_NONE);
/* Parsers only work for the specified codec ids. */
av_assert1(avctx->codec_id == s->parser->codec_ids[0] ||
avctx->codec_id == s->parser->codec_ids[1] ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment