Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörn Heusipp <osmanx@problemloesungsmaschine.de>2018-01-11 11:11:29 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2018-01-12 14:31:55 +0300
commita571a2a65abea24adb3a9fff4b05bc562ce93ed6 (patch)
tree144a4659cbf6becb5ffc64f064230f30f3c9c67f /libavformat/libopenmpt.c
parent9b955eece610f7f8b4aa2096b4e0ca738e21edc4 (diff)
avformat/libopenmpt: Fix mixed code and declarations
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/libopenmpt.c')
-rw-r--r--libavformat/libopenmpt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
index af6eb1ac4a..2e22290003 100644
--- a/libavformat/libopenmpt.c
+++ b/libavformat/libopenmpt.c
@@ -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);