From bf9f6a5e559c901453b484a606e27af54d7e93d5 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 29 Jul 2023 17:58:58 +0200 Subject: [PATCH] avformat/lrcdec: Fix declaration-after-statement warning Happens since c0f867bf503e79eba8ee52e1ac53322f88ec2929. Signed-off-by: Andreas Rheinhardt --- libavformat/lrcdec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/lrcdec.c b/libavformat/lrcdec.c index 83bb4a4b75..f43e9dccf5 100644 --- a/libavformat/lrcdec.c +++ b/libavformat/lrcdec.c @@ -170,10 +170,11 @@ static int lrc_read_header(AVFormatContext *s) av_bprint_init(&line, 0, AV_BPRINT_SIZE_UNLIMITED); while(!avio_feof(s->pb)) { - int64_t pos = read_line(&line, s->pb); + int64_t header_offset, pos = read_line(&line, s->pb); + if (!av_bprint_is_complete(&line)) goto err_nomem_out; - int64_t header_offset = find_header(line.str); + header_offset = find_header(line.str); if(header_offset >= 0) { char *comma_offset = strchr(line.str, ':'); if(comma_offset) {