avformat/mov: Fix mixed declaration and statement warning
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 18:51:38 +0000 (19:51 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 16:19:10 +0000 (17:19 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit db27f50e0658e91758e8a17fdcf390e6bc93c1d2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c

index 2313674..7455e3b 100644 (file)
@@ -210,10 +210,11 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
 static int mov_metadata_raw(MOVContext *c, AVIOContext *pb,
                             unsigned len, const char *key)
 {
+    char *value;
     // Check for overflow.
     if (len >= INT_MAX)
         return AVERROR(EINVAL);
-    char *value = av_malloc(len + 1);
+    value = av_malloc(len + 1);
     if (!value)
         return AVERROR(ENOMEM);
     avio_read(pb, value, len);