[FFmpeg-cvslog] Revert "avparser: don't av_malloc(0)."

Michael Niedermayer git at videolan.org
Fri Apr 29 02:16:18 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 29 02:14:43 2011 +0200| [85ff33948963257d418abe7d8975b4c9c4641223] | committer: Michael Niedermayer

Revert "avparser: don't av_malloc(0)."

This hack is no longer needed.

This reverts commit 191e08d113ef1d089c45c5fb6c95491e16dde86e.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85ff33948963257d418abe7d8975b4c9c4641223
---

 libavcodec/parser.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index b5c34df..c1c8ce2 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);



More information about the ffmpeg-cvslog mailing list