OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b9e981
)
avparser: don't av_malloc(0).
author
Ronald S. Bultje
<rbultje@google.com>
Wed, 27 Apr 2011 01:46:08 +0000
(18:46 -0700)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 27 Apr 2011 02:20:55 +0000
(
04:20
+0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/parser.c
patch
|
blob
|
history
diff --git
a/libavcodec/parser.c
b/libavcodec/parser.c
index
c1c8ce2
..
b5c34df
100644
(file)
--- a/
libavcodec/parser.c
+++ b/
libavcodec/parser.c
@@
-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);