Browse Source

avformat/libopenmpt: Fix mixed code and declarations

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.0
Jörn Heusipp Michael Niedermayer 8 years ago
parent
commit
a571a2a65a
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      libavformat/libopenmpt.c

+ 6
- 5
libavformat/libopenmpt.c 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);


Loading…
Cancel
Save