X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fparser.c;h=2c8fc6904727c2684cec9519945972386c5e70ee;hb=2d720069a91b48dc201a43cc11e8d55fc332df48;hp=d25d261acdae9cdf80946440ebc57a0bd42de9a2;hpb=79127dbbeffa87243c92af2befc09ad63bcbd1a1;p=ffmpeg diff --git a/libavcodec/parser.c b/libavcodec/parser.c index d25d261acda..2c8fc690472 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] ||