Browse Source

avformat/mov: Fix mixed declaration and statement warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3.6^0
Michael Niedermayer 11 years ago
parent
commit
db27f50e06
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/mov.c

+ 2
- 1
libavformat/mov.c View File

@@ -214,10 +214,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);


Loading…
Cancel
Save