diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-01 18:50:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-01 19:08:29 +0200 |
commit | 9f03b85045fd8fb776502ea4d5e17a42fb37bf04 (patch) | |
tree | 4036eeab0031cf5f7ea2da04d60d01f4d52de0df /libavcodec/parser.c | |
parent | b6b4b0a65e02495edf9d7e5b23bef99a92921147 (diff) | |
download | ffmpeg-9f03b85045fd8fb776502ea4d5e17a42fb37bf04.tar.gz |
avcodec/parser: assert that the codec id is not NONE in av_parser_parse2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r-- | libavcodec/parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c index d25d261acd..2c8fc69047 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -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] || |