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 5AA484C649 for ; Wed, 31 Jul 2024 09:44:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A489D68D6ED; Wed, 31 Jul 2024 12:44:26 +0300 (EEST) Received: from mail.codeweavers.com (mail.codeweavers.com [4.36.192.163]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7FEBF68D5D1 for ; Wed, 31 Jul 2024 12:44:19 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codeweavers.com; s=s1; h=From:To:Subject:Date:Message-ID:Cc:Sender; bh=eRzTpQPk2LmymhPyQ4d56tZ384oTuvRmBBZxDN/8tPM=; b=qlkb9/cxakLUQxUH7mcus98fwm q7WfLRG9Cv0iKhWuovWNRQ+CQ5/53J9zF69+MDlJN9oEDFeqfPElcYSjzMFiJAR34kDSxnBEn9NEX ACIYUDs/zY+5Xp8QdpVGwkeL6jluaM7PQnqyQTWA2/bHBK7NG0z7gL/X6xwzuOXt3sC1K7v7Qbb6H h6+CWYFfbJBhPHyB1jZ/+FzoMvbsNDdayU3YqKKrtqUxZ79svQgE8k9CdhhgeKuvC0nRl+HIqxxjn vdfi2en7nc4oyzZSWag9ABcweFolvggHJ2cUtPUmHQ+5XWy3Un0bLUufnGtZW0DZfmklgbfFsmtUu 1XFD2R7A==; Received: from cw141ip115.vpn.codeweavers.com ([10.69.141.115]) by mail.codeweavers.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1sZ5sX-00HR9k-1B for ffmpeg-devel@ffmpeg.org; Wed, 31 Jul 2024 04:44:17 -0500 Message-ID: Date: Wed, 31 Jul 2024 11:43:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20240730131149.210571-1-gmascellani@codeweavers.com> <20240730205452.GP4991@pb2> Content-Language: it-IT, en-US From: Giovanni Mascellani In-Reply-To: <20240730205452.GP4991@pb2> Subject: Re: [FFmpeg-devel] [PATCH 0/2] Interpret a degenerate SAR as 1/1. 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi, Il 30/07/24 22:54, michael at niedermayer.cc (Michael Niedermayer) ha scritto: > Why does playback fail ? > 1/1 and unspecified are different things, 0/0 would be unspecified > where does 20480/0 turn into 20480/1 ? or did i misunderstand this? It seems that denominator 0 is replaced with 1 here: https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/262168b04e6807fce6a78507c14cfc166ba72845:/libavcodec/h264_ps.c#l552 Considering the other replies I would guess that the intent is to prevent a division by zero from happening, but the side effect is that an invalid SAR is silently converted to a valid one (even if quite extreme). I am not sure why that in turn causes the playback problems. I noticed that the same problem can be reproduced on any other H.264 file simply by forcing the broken 20480/0 SAR in ff_h2645_decode_common_vui_params(). After a few more experiments, it seems that ffmpeg is indeed able to handle an unspecified SAR, but it doesn't like it to be represented as x/0, only 0/x. I'll send a revised patch which replaces x/0 with 1/0, hopefully addressing your concern. Thanks, Giovanni. _______________________________________________ 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".