diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 5fb2b06940..780b7043ab 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -34,6 +34,9 @@ AVCodecParserContext *av_parser_init(int codec_id) AVCodecParserContext *s; AVCodecParser *parser; int ret; + + if(codec_id == CODEC_ID_NONE) + return NULL; for(parser = av_first_parser; parser != NULL; parser = parser->next) { if (parser->codec_ids[0] == codec_id ||