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 848C14F479 for ; Fri, 27 Feb 2026 00:08:29 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'7fHgkTU+hQ2AFOSyqMvrcijMubabgk/fodsofqwN6Ww=', expected b'wPzXslyPxD37f22RUvCFfc68FyEnhz8kABlLxVqU7jw=')) 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=1772150897; 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=7fHgkTU+hQ2AFOSyqMvrcijMubabgk/fodsofqwN6Ww=; b=kXjDHBqWql6gTTiYLnZyznAz/adx4QVMo9ba9wTzttARFZoQE1UbXhCoePvhMzJ7+s03Q 0oVEMKAxAl97bH1dL84xjiQIAcEhYAZeXRweNVTU2dEcXwDEghE/a68kV0rB4joWZgZC2yJ YvEuIexa3isYYPAYqBx7ulr9zK80J5fumYc/awmjIjudmvgtg5DV8Au05QYKnwOa5PE70Ib uetzyUuw2X5Dv+S1aBewf4BZe4rA84BfSdtpD3PEEcwSLwsvB5DEAamtKgGfO3yQZv9NdIu SKsAmELeoVGJ2gaIcaUZlC4SzlY4G+WkmtvjXEGrsqPIpMbOvSCffPnA/pVA== Received: from [172.18.0.3] (unknown [172.18.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id EA1F3691353; Fri, 27 Feb 2026 02:08:17 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1772150878; b=MDx5efclvorrOgmzDhuiXA1p2Ojy4uahxNuWTOxjOGxkCp31lLPgnfNlZ4E99jVbnsb1n CjzTtJcfOQxzHlsxHhURjoV9Hh11xISG6zaAgKGt+79hIBRlAQpuw4yIUdeXlWUpOhOLizy LFQnQ3h8UNb70MiusRKGljgQVIjqLN5WW9J4NSCdFkkRP9CKRRUzVlgi+jiswthuthxgnUo +X6VP93lFYKQH0QUBCF44RnWR0FQCztv4dFAB1FK/DXtFOVePhOapnFXXyMu6NvLupirDtz f+1NZcPzXtX8yYGJKdqVSGkq7bc0ENZYQA4sNa0JbBxQ5iQaFj5+NAU5E3nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1772150878; 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=gGSHqNwwvKsJCTLCFiKFUeqXm90Kx5AYkGo1npMsstk=; b=G1kk1FnsKV8r24xiMrkAvYhGM1zUflqbHpjc1YbwuCl+G+8LsI0COuancQhVv9ICXYf6E jkXBcoRudKhNUjtM1ASgSkCWQFNYAbWl3FB7gdLWIZGyjMQbm90vg5aD6a+lBN5ilG4c9QK QiU9Mvwoxk39gCYynSvGnHolKC4vZiNYayD/4Pg5RnFthuR9Ku/JbbvGrojL9/KOVlI79po h0WJHBgwMoXW585Ip1u4NLB+ZIHanleFPpMV37BLU0E3xDo4qxLbllB2x3bcDHowgSlIXF6 V+hFMjKgZWL9A8tQfqMkXuOzJ5+ZWiQsVNSy44uziwZnaX6X+9XRHs/102IA== 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=1772150870; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=wPzXslyPxD37f22RUvCFfc68FyEnhz8kABlLxVqU7jw=; b=wM9TXoclY1iXN/Od4MkLRDJzj1eRiTe45YLxVqBZbQ30SP3xPW0MR2I1pU+szEZNz6A5x 6TOJ4zwA9tu0hqRkv+5m0HufeTzSG87DCSfcjOa8/20CBeKSTvYr6rTVQU6CMpb5lWDqYDJ OkxmKyK5/LZc5FEE6a8DCVUvAm6Jm9W/1/MwR1r8GGm9myEBfLj3tucult/Z32jLdiALehQ dDcFFBpiP7ExPwGH8G8ImPq9wnj4b74vaIjRxXZiEhia7qXDs/vN+j9moAD8HQ2Fla53qhy 9sI75b+l1f093OzSjNtBsZO2k2K/GfVOtFas3/UEaF7eNRDjvvc/oIqgSXNw== MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Feb 2026 00:07:50 -0000 Message-ID: <177215087105.25.16152482500797726348@29965ddac10e> Message-ID-Hash: 5JKFHGKIKAWI6B3WA5R55K7ICNJK3FW2 X-Message-ID-Hash: 5JKFHGKIKAWI6B3WA5R55K7ICNJK3FW2 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] [PR] Suggest 0/0 explicitly as unknown aspect ratio (PR #22301) 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: michaelni via ffmpeg-devel Cc: michaelni Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #22301 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22301 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22301.patch The docs currently talk about 0 but for fractions that means 0/x with x!=0 but 0/0 is often used and is mathematical a more correct choice for "unknown" 0 in fact is not unknown in a mathematical sense Signed-off-by: Michael Niedermayer >>From 2b21b5ca8a7e73a35eed12370bb7796586be5891 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 27 Feb 2026 00:58:56 +0100 Subject: [PATCH] Suggest 0/0 explicitly as unknown aspect ratio The docs currently talk about 0 but for fractions that means 0/x with x!=0 but 0/0 is often used and is mathematical a more correct choice for "unknown" 0 in fact is not unknown in a mathematical sense Signed-off-by: Michael Niedermayer --- libavcodec/avcodec.h | 2 +- libavcodec/codec_par.h | 2 +- libavformat/avformat.h | 2 +- libavformat/internal.h | 2 +- libavutil/frame.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 1a8f77af82..9d413a3510 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -615,7 +615,7 @@ typedef struct AVCodecContext { int coded_width, coded_height; /** - * sample aspect ratio (0 if unknown) + * sample aspect ratio (0/0 or 0 if unknown) * That is the width of a pixel divided by the height of the pixel. * Numerator and denominator must be relatively prime and smaller than 256 for some video standards. * - encoding: Set by user. diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h index 2697605d4d..b86ac85ce0 100644 --- a/libavcodec/codec_par.h +++ b/libavcodec/codec_par.h @@ -139,7 +139,7 @@ typedef struct AVCodecParameters { * should have when displayed. * * When the aspect ratio is unknown / undefined, the numerator should be - * set to 0 (the denominator may have any value). + * set to 0 (the denominator may have any value but 0 is the mathematical correct value). */ AVRational sample_aspect_ratio; diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 76c251ac02..c8526c0063 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -817,7 +817,7 @@ typedef struct AVStream { enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed. /** - * sample aspect ratio (0 if unknown) + * sample aspect ratio (0/0 or 0 if unknown) * - encoding: Set by user. * - decoding: Set by libavformat. */ diff --git a/libavformat/internal.h b/libavformat/internal.h index 64452cce6e..bd42db738b 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -289,7 +289,7 @@ typedef struct FFStream { uint8_t dts_misordered; /** - * display aspect ratio (0 if unknown) + * display aspect ratio (0 or 0/0 if unknown) * - encoding: unused * - decoding: Set by libavformat to calculate sample_aspect_ratio internally */ diff --git a/libavutil/frame.h b/libavutil/frame.h index 088b24b717..8b2a8a2c11 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -519,7 +519,7 @@ typedef struct AVFrame { enum AVPictureType pict_type; /** - * Sample aspect ratio for the video frame, 0/1 if unknown/unspecified. + * Sample aspect ratio for the video frame, 0/0 or 0/1 if unknown/unspecified. */ AVRational sample_aspect_ratio; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org