diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 19:51:38 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 02:13:08 +0200 |
commit | 04e28b3b257f02370aeb1e4c7b0836d7ea9f21f4 (patch) | |
tree | 49421a437727c1cae7ffb91f6f5c99e4b03004c5 | |
parent | 81a766e57a34b6a5525c731024ce304b1bf4af21 (diff) | |
download | ffmpeg-04e28b3b257f02370aeb1e4c7b0836d7ea9f21f4.tar.gz |
avformat/mov: Fix mixed declaration and statement warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit db27f50e0658e91758e8a17fdcf390e6bc93c1d2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mov.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index eba27b3108..681260a8b7 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -278,10 +278,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); |