aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-29 02:14:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-29 02:17:38 +0200
commit85ff33948963257d418abe7d8975b4c9c4641223 (patch)
tree9cd1beafa4a8a596e11e4020f96c7e112aecf06d /libavcodec/parser.c
parent5a36783bc4a1887a67dbfe5ec7198903f35a46b1 (diff)
downloadffmpeg-85ff33948963257d418abe7d8975b4c9c4641223.tar.gz
Revert "avparser: don't av_malloc(0)."
This hack is no longer needed. This reverts commit 191e08d113ef1d089c45c5fb6c95491e16dde86e.
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r--libavcodec/parser.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index b5c34dfb76..c1c8ce22ca 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -58,12 +58,10 @@ 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;
- }
+ 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);