From 34b01aa9e279e78acff4a4eba76b6d9b64df4a87 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 13 Mar 2025 18:25:07 +0100 Subject: [PATCH] nihav_core/codecs: clarify EncodeParameters.tb_{num,den} usage for audio case --- nihav-core/src/codecs/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nihav-core/src/codecs/mod.rs b/nihav-core/src/codecs/mod.rs index 80e2da8..e009b31 100644 --- a/nihav-core/src/codecs/mod.rs +++ b/nihav-core/src/codecs/mod.rs @@ -285,9 +285,13 @@ pub const ENC_CAPS_PARAMCHANGE: u64 = 1 << 2; pub struct EncodeParameters { /// Input format. pub format: NACodecTypeInfo, - /// Time base numerator. Ignored for audio. + /// Time base numerator. + /// + /// Audio encoders generally do not need it but some may use it to set e.g. frame length, so set it to the video/container codec timebase in such case. pub tb_num: u32, - /// Time base denominator. Ignored for audio. + /// Time base denominator. + /// + /// Audio encoders generally do not need it but some may use it to set e.g. frame length, so set it to the video/container codec timebase in such case. pub tb_den: u32, /// Bitrate in bits per second. pub bitrate: u32, -- 2.39.5