[FFmpeg-cvslog] avformat/libopenmpt: Fix mixed code and declarations

Jörn Heusipp git at videolan.org
Fri Jan 12 13:54:07 EET 2018


ffmpeg | branch: master | Jörn Heusipp <osmanx at problemloesungsmaschine.de> | Thu Jan 11 09:11:29 2018 +0100| [a571a2a65abea24adb3a9fff4b05bc562ce93ed6] | committer: Michael Niedermayer

avformat/libopenmpt: Fix mixed code and declarations

Signed-off-by: Jörn Heusipp <osmanx at problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a571a2a65abea24adb3a9fff4b05bc562ce93ed6
---

 libavformat/libopenmpt.c | 11 ++++++-----
 1 file 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);



More information about the ffmpeg-cvslog mailing list