From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 287DF4C009 for ; Fri, 5 Dec 2025 16:24:30 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'Jgq1LAeiNtTwKqZfOxGdgPoyFP+2cClRQ6zqdvuWN78=', expected b'6UY3VoEnL+gV7vMb0SO1p7jaXg1WlVQvjFVHozTYT+g=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1764951861; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=Jgq1LAeiNtTwKqZfOxGdgPoyFP+2cClRQ6zqdvuWN78=; b=qCb5iklFAGpppBii0GyYZRGrC2fT/9ysXfZkkVqoN2/qaYXsMm4aMR4j1dAnTc6eQtSOQ UVU9GMPG6ZzccYnBkJYFnGnaL3WdQPy54PLQy9DFLpQBXgfxBjfkLVzsTxMz/tF+M4ElSpH hlWRoLgrFKqNHZjqhTHjNpgCvvKeWQZrXGPN8DwJZJqcechQnP35wA1fsvyre7G6L888qkO 4ZzaYSTs5e9JhB5QBToDKh0J6FQiN8YkDpWheAxfLxGpMBWyBPRB5LTLjcxaI2Ssgm+Eehj Y3qs7P6dXTqLA2CyueQr8CkrI6mtL3IgaW8TD60E1pZAXuZ1gz5ICdDwpZcQ== Received: from [172.19.0.3] (unknown [172.19.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 9916B690581; Fri, 5 Dec 2025 18:24:21 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1764951849; b=peGn9wFzAwdB905Ea/a0cQEo63aaHuir8OzFiXKPpvBJXC11gTAxVBdUWzG1IT4sRNU3T XdPG7udnu5bgaqQiSn7UDZ5QncmxRS+rcMz5PcKpOXPM0TV/yQEPj78rA1zv/ehxRNEZ49Q kQ3fzgvmEKvJJZFooYARb0HkazZSGMNBW0Qb/9RmKakrw3RIL8kCtuYIGffbHQuOwCxII+8 A1RY3G2owlxRMmc4JGeMP9Fm/OJKDWaEpOJKPQrfcxxoER6nAn9fgRxOg/8pBJDBdiPfA46 W3Rq44dOIuhlfPWjBy9yO7f6aIx6y29QajyvFwwBMWVjLLdtjhlap65FZ/cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1764951849; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=ROWh7GpWHObk7+c0Wn0JVJ3tMOUgIicvWgzLmemzD44=; b=Iofb1F016IS0YEZW4+t6Yhlt3TDakbowx/7P4mKJSqEkIBkxfHxbbIwpX3Avo6Y4AmABg Cd+UkvKvFMvNzw/FvEc0u/o+02+ILVdzi1Jz61IdHD+YZLhvaVaEffkYgGx0NQFp+30fZIo Rn2gtQOPzv2SginokRJM0Dpx9JoFayt5WSVQWVUbp9RzMmClrDuaTnoyHwYg3fxTtVcodxU CI/6rRVCxrAeH+6wJQ9tcCe1QsA6jQvz0oYZuafHbqMnv7SdO8RefE7jK8K+bUkdCymNvZk jwcDVpDA9o7BRtyyMI5LWp5KOFzX4c6Q86oHY9R50RzbUamv3RqEYywyTiFw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1764951842; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=6UY3VoEnL+gV7vMb0SO1p7jaXg1WlVQvjFVHozTYT+g=; b=MEMgPkoeHIczezhGNQKepoinv7lssdyleLAht6A6TuY+/bag2YFVAtMZgsTHl37pdNLvZ PRfbI2X/5cFe9Cd0froKJXTQmqoYtL1Hep0RFOxN5BtoIjqo8Dj2YOIT6szbUgnYHhi2p8u 0pgOdho1eWS8z0ioDdekFlMB0Lg5EPWgcqw50uFlW9CUh4qe3qAfM25JfQBc2Bu8nr/uD5x fcOoRmttonEYXDqnttSN99aE4X+o2P0JryuLyQCXAX33XaAVsoZTgSJuYHImLL7VNH82HTo O9Z7Ih7ibGLgSaQn/OPf5pwCC5OTcO37vW7urPc2x8B5Nq5pTjgK2lGIMOTA== Received: from 55ca25703178 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 7F891690547 for ; Fri, 5 Dec 2025 18:24:02 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Fri, 05 Dec 2025 16:24:02 -0000 Message-ID: <176495184264.39.5596703958079514528@2cb04c0e5124> Message-ID-Hash: NKGMZSG6BM35B3FA4FVDKE5COEISOMYN X-Message-ID-Hash: NKGMZSG6BM35B3FA4FVDKE5COEISOMYN X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avcodec/alac: fix decode errors on empty last frames (PR #21111) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: rmmh via ffmpeg-devel Cc: rmmh Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21111 opened by rmmh URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21111 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21111.patch iOS Voice Memos frequently produces ALAC files with a zero-sample last frame. Instead of bubbling up an error that might cause a transcode to fail, simply don't decode the frame. >>From f2a31efae7c42aa8bac2a4747df0fcad40a62868 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Fri, 5 Dec 2025 09:20:29 -0700 Subject: [PATCH] avcodec/alac: fix decode errors on empty last frames iOS Voice Memos frequently produces ALAC files with a zero-sample last frame. Instead of bubbling up an error that might cause a transcode to fail, simply don't decode the frame. --- libavcodec/alac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index f91288e97c..0acc568174 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -267,7 +267,9 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index, output_samples = get_bits_long(gb, 32); else output_samples = alac->max_samples_per_frame; - if (!output_samples || output_samples > alac->max_samples_per_frame) { + if (!output_samples) + return 0; + if (output_samples > alac->max_samples_per_frame) { av_log(avctx, AV_LOG_ERROR, "invalid samples per frame: %"PRIu32"\n", output_samples); return AVERROR_INVALIDDATA; -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org