Browse Source

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.1
Michael Niedermayer 9 years ago
parent
commit
9f03b85045
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/parser.c

+ 2
- 0
libavcodec/parser.c View File

@@ -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] ||


Loading…
Cancel
Save