From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 20DBA4ABD4 for ; Tue, 14 May 2024 20:02:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 752CC68D752; Tue, 14 May 2024 23:02:49 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B2D8968D740 for ; Tue, 14 May 2024 23:02:42 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 8EF54EA3CB; Tue, 14 May 2024 22:02:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MbSmo7B_-4Wp; Tue, 14 May 2024 22:02:40 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id DEE77EA5DA; Tue, 14 May 2024 22:02:39 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 May 2024 22:02:26 +0200 Message-Id: <20240514200226.4320-3-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240514200226.4320-1-cus@passwd.hu> References: <20240514200226.4320-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avformat/mp3dec: change bogus error message if read_header encounters EOF X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Marton Balint Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Because of ffio_ensure_seekback() a seek error normally should only happen if the end of file is reached during checking for the junk run-in. Also use proper error code. Signed-off-by: Marton Balint --- libavformat/mp3dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 4abc73966f..f421e03926 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -415,8 +415,8 @@ static int mp3_read_header(AVFormatContext *s) if (ret >= 0 && (header & MP3_MASK) == (header2 & MP3_MASK)) break; } else if (frame_size == CHECK_SEEK_FAILED) { - av_log(s, AV_LOG_ERROR, "Failed to read frame size: Could not seek to %"PRId64".\n", (int64_t) (i + 1024 + frame_size + 4)); - return AVERROR(EINVAL); + av_log(s, AV_LOG_ERROR, "Failed to find two consecutive MPEG audio frames.\n"); + return AVERROR_INVALIDDATA; } } if (i == 64 * 1024) { -- 2.35.3 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".