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 ESMTPS id 221BF4E17E for ; Sat, 8 Mar 2025 21:00:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8105168E547; Sat, 8 Mar 2025 23:00:45 +0200 (EET) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D384168E161 for ; Sat, 8 Mar 2025 23:00:38 +0200 (EET) Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-30bef9b04adso25449321fa.1 for ; Sat, 08 Mar 2025 13:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onemimir.com; s=google; t=1741467638; x=1742072438; darn=ffmpeg.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=LCeVKrda3B9qefAu62k6wNTISnCdgm7M1WL3KdTsIXU=; b=WO1MCD1XKQyHTLD08HPjCA6UrCBwUhs0eoBscVZGQuA+tMHhwLexcpqEfiTJYa9fhJ AcAZI4mMEYXhXoglUvgLFd1oCdndWFYKwQ3sjzbNzXzIAdTOVZMIpl0qSrV78fcZX7uS V9bIstGkqsrt64r9eoKq+UIgwdY8MgGWULRQESRoHaqxhZVu3u/tdj5DcYUuuYtEhZU5 Nd+0e/QpGnhjk6L4o8e6+zJS4izzDVygGBtm2e4yUDUMyNzP/trtMepSNv5p+2ExfZKI nVXji2e3I0LAYCgT2+/R991lUnT16ZFEId1URPqXV+5p9YsN46kKL9jbHYwH6CUceFOW Ajyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741467638; x=1742072438; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :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received: by 2002:a2e:a54e:0:b0:30b:f274:d1f6 with SMTP id 38308e7fff4ca-30bf4507e15mr31793171fa.13.1741467637658; Sat, 08 Mar 2025 13:00:37 -0800 (PST) Received: from localhost ([2001:4649:e5a8:0:59c3:b34e:4187:4cf8]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30bfa502dd7sm5511521fa.12.2025.03.08.13.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Mar 2025 13:00:37 -0800 (PST) From: Anders Rein To: ffmpeg-devel@ffmpeg.org Date: Sat, 8 Mar 2025 22:00:34 +0100 Message-ID: <20250308210034.9842-1-anders@onemimir.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] Include field_mode information in NUT stream info 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: Anders Rein 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: This will make it possible to transmit raw video over NUT without losing the field order information. --- libavformat/nutdec.c | 4 ++++ libavformat/nutenc.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 34b7e3cb9a..07eff23134 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -607,6 +607,10 @@ static int decode_info_header(NUTContext *nut) continue; } + if (stream_id_plus1 && !strcmp(name, "field_order")) { + sscanf(str_value, "%d", &st->codecpar->field_order); + } + if (metadata && av_strcasecmp(name, "Uses") && av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces")) { if (event_flags) diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 55efb114c3..0853fecf5c 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -566,6 +566,9 @@ static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id) { else snprintf(buf, sizeof(buf), "%d/%d", st->avg_frame_rate.num, st->avg_frame_rate.den); count += add_info(dyn_bc, "r_frame_rate", buf); + + snprintf(buf, sizeof(buf), "%d", st->codecpar->field_order); + count += add_info(dyn_bc, "field_order", buf); } dyn_size = avio_close_dyn_buf(dyn_bc, &dyn_buf); -- 2.48.1 -- Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error or are not the named addressee, you should not disseminate, distribute or copy this email. Please notify the author by replying to this e-mail and destroy this email and any attachments. _______________________________________________ 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".