History

avparser: don't av_malloc(0).

Ronald S. Bultje committed 15 years ago

Commit 191e08d1 parent 7b9e9811 file · +6 −4Browse files

Unified · Split

libavcodec/parser.c+6−4
@@ -58,10 +58,12 @@ AVCodecParserContext *av_parser_init(int codec_id) · 57 unmodified lines
58 if (!s)58 if (!s)
59 return NULL;59 return NULL;
60 s->parser = parser;60 s->parser = parser;
61 s->priv_data = av_mallocz(parser->priv_data_size);61 if (parser->priv_data_size) {
62 if (!s->priv_data) {62 s->priv_data = av_mallocz(parser->priv_data_size);
63 av_free(s);63 if (!s->priv_data) {
64 return NULL;64 av_free(s);
65 return NULL;
66 }
65 }67 }
66 if (parser->parser_init) {68 if (parser->parser_init) {
67 ret = parser->parser_init(s);69 ret = parser->parser_init(s);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t