Commit a571a2a6 authored by Jörn Heusipp's avatar Jörn Heusipp Committed by Michael Niedermayer

avformat/libopenmpt: Fix mixed code and declarations

Signed-off-by: 's avatarJörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9b955eec
...@@ -72,13 +72,14 @@ static int read_header_openmpt(AVFormatContext *s) ...@@ -72,13 +72,14 @@ static int read_header_openmpt(AVFormatContext *s)
{ {
AVStream *st; AVStream *st;
OpenMPTContext *openmpt = s->priv_data; OpenMPTContext *openmpt = s->priv_data;
int64_t size = avio_size(s->pb); int64_t size;
if (size <= 0) char *buf;
return AVERROR_INVALIDDATA;
char *buf = av_malloc(size);
int ret; int ret;
size = avio_size(s->pb);
if (size <= 0)
return AVERROR_INVALIDDATA;
buf = av_malloc(size);
if (!buf) if (!buf)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
size = avio_read(s->pb, buf, size); size = avio_read(s->pb, buf, size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment