1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/libopenmpt: Fix mixed code and declarations

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Jörn Heusipp 2018-01-11 09:11:29 +01:00 committed by Michael Niedermayer
parent 9b955eece6
commit a571a2a65a

View File

@ -72,13 +72,14 @@ static int read_header_openmpt(AVFormatContext *s)
{
AVStream *st;
OpenMPTContext *openmpt = s->priv_data;
int64_t size = avio_size(s->pb);
if (size <= 0)
return AVERROR_INVALIDDATA;
char *buf = av_malloc(size);
int64_t size;
char *buf;
int ret;
size = avio_size(s->pb);
if (size <= 0)
return AVERROR_INVALIDDATA;
buf = av_malloc(size);
if (!buf)
return AVERROR(ENOMEM);
size = avio_read(s->pb, buf, size);