Revert "avparser: don't av_malloc(0)."
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 29 Apr 2011 00:14:43 +0000 (02:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 29 Apr 2011 00:17:38 +0000 (02:17 +0200)
This hack is no longer needed.

This reverts commit 191e08d113ef1d089c45c5fb6c95491e16dde86e.

libavcodec/parser.c

index b5c34df..c1c8ce2 100644 (file)
@@ -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);