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 037A347E15 for ; Fri, 27 Oct 2023 19:04:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5ECAA68CBAB; Fri, 27 Oct 2023 22:04:28 +0300 (EEST) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2DDE768CBA6 for ; Fri, 27 Oct 2023 22:04:22 +0300 (EEST) Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 807679F6 for ; Fri, 27 Oct 2023 21:04:21 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 49hjMMf0pKbT for ; Fri, 27 Oct 2023 21:04:19 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 500D29E7 for ; Fri, 27 Oct 2023 21:04:19 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id B23B83A068B for ; Fri, 27 Oct 2023 20:54:40 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Oct 2023 20:54:34 +0200 Message-ID: <20231027185434.672-1-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavf/smacker: export sample_aspect_ratio 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-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: Fixes #10617 --- libavformat/smacker.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 1d54e8e917..d04c8b91a6 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -34,6 +34,8 @@ #define SMACKER_PAL 0x01 #define SMACKER_FLAG_RING_FRAME 0x01 +#define SMACKER_FLAG_Y_INTERLACE (1 << 1) +#define SMACKER_FLAG_Y_DOUBLE (1 << 2) enum SAudFlags { SMK_AUD_PACKED = 0x80, @@ -144,6 +146,9 @@ static int smacker_read_header(AVFormatContext *s) avpriv_set_pts_info(st, 33, pts_inc, tbase); st->duration = smk->frames; + st->sample_aspect_ratio = (AVRational){ 1, 1 + + !!(flags & (SMACKER_FLAG_Y_INTERLACE | SMACKER_FLAG_Y_DOUBLE)) }; + /* init video codec */ par = st->codecpar; par->width = width; -- 2.42.0 _______________________________________________ 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".