[FFmpeg-devel,v3,1/4] avformat/libopenmpt: Fix mixed code and declarations

Submitted by Jörn Heusipp on Jan. 11, 2018, 8:11 a.m.

Details

Message ID 1515658292-4719-1-git-send-email-osmanx@problemloesungsmaschine.de
State New
Headers show

Commit Message

Jörn Heusipp Jan. 11, 2018, 8:11 a.m.
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
---
 libavformat/libopenmpt.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Michael Niedermayer Jan. 12, 2018, 11:35 a.m.
On Thu, Jan 11, 2018 at 09:11:29AM +0100, Jörn Heusipp wrote:
> Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
> ---
>  libavformat/libopenmpt.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)

applied

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
index af6eb1a..2e22290 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);