You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avparser: don't av_malloc(0).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
7b9e98173c
commit
191e08d113
@@ -58,10 +58,12 @@ AVCodecParserContext *av_parser_init(int codec_id)
|
||||
if (!s)
|
||||
return NULL;
|
||||
s->parser = parser;
|
||||
s->priv_data = av_mallocz(parser->priv_data_size);
|
||||
if (!s->priv_data) {
|
||||
av_free(s);
|
||||
return NULL;
|
||||
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);
|
||||
|
Reference in New Issue
Block a user