avformat/mov: Fix mixed declaration and statement warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit db27f50e06)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-06 19:51:38 +01:00
parent e81236d1a5
commit 529488afa3
1 changed files with 2 additions and 1 deletions

View File

@ -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);