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:
79ee897
)
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
Ronald S. Bultje
<rsbultje@gmail.com>
Wed, 27 Apr 2011 05:07:17 +0000
(22:07 -0700)
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/parser.c
patch
|
blob
|
history
diff --git
a/libavcodec/parser.c
b/libavcodec/parser.c
index
d5b85c3
..
4b3d30e
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);