Commit 191e08d1 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Michael Niedermayer

avparser: don't av_malloc(0).

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7b9e9817
......@@ -58,11 +58,13 @@ AVCodecParserContext *av_parser_init(int codec_id)
if (!s)
return NULL;
s->parser = parser;
if (parser->priv_data_size) {
s->priv_data = av_mallocz(parser->priv_data_size);
if (!s->priv_data) {
av_free(s);
return NULL;
}
}
if (parser->parser_init) {
ret = parser->parser_init(s);
if (ret != 0) {
......
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