mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
b3c082412c
commit
d0041dc8c4
|
@ -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,
|
static int mov_metadata_raw(MOVContext *c, AVIOContext *pb,
|
||||||
unsigned len, const char *key)
|
unsigned len, const char *key)
|
||||||
{
|
{
|
||||||
|
char *value;
|
||||||
// Check for overflow.
|
// Check for overflow.
|
||||||
if (len >= INT_MAX)
|
if (len >= INT_MAX)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
char *value = av_malloc(len + 1);
|
value = av_malloc(len + 1);
|
||||||
if (!value)
|
if (!value)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
avio_read(pb, value, len);
|
avio_read(pb, value, len);
|
||||||
|
|
Loading…
Reference in New Issue