avparser: don't av_malloc(0).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Ronald S. Bultje 14 years ago committed by Michael Niedermayer
parent 7b9e98173c
commit 191e08d113
  1. 2
      libavcodec/parser.c

@ -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) {

Loading…
Cancel
Save