aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-06 19:51:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-13 17:06:08 +0100
commitad0c39c1f10f127ab8981f75c37fd48f45aaae52 (patch)
tree8d947c45ff193e561d0d634358f81e1387c1b683
parent3eee7e0db60dc2d3756bde814f21f3df72eb0b0b (diff)
downloadffmpeg-ad0c39c1f10f127ab8981f75c37fd48f45aaae52.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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c55834e838..9f226c7b36 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -281,10 +281,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);