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 716A14A092 for ; Tue, 19 Mar 2024 16:30:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1D6DC68D3CF; Tue, 19 Mar 2024 18:30:45 +0200 (EET) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 81A6C68CB28 for ; Tue, 19 Mar 2024 18:30:38 +0200 (EET) Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-56ba6c83805so377330a12.0 for ; Tue, 19 Mar 2024 09:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710865837; x=1711470637; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=BaIq1+MZR0xG84qrX63u0cttvMj+WIfwQpAesDfuU9U=; b=IcQXoOCJphemLTIf/z5us7Qj5VqDITxHUfIlilwldTIXOPWQ31gxSRe0hNsxud1I8/ i6QyhRxEJ2g57KkPAChgmRo+sZyWe2qD/SUchtSDSkPIm7BX09kwX+TnCzyu2o9ne0Ga irlQcp0ZyZU0i8m6zTT8tFYx/0o9k1D2vp0rtoUw4W42dt0hkrmmL9IxB9qvf2PJAayV h8wDLb/xZNdc/LnyGrlXpoOn/cS8JwCP1IFnWe9USIxsfZ3u2VuaGCHgI9X5P24LO1hS sORxRkxKdE7w/mHxb6QgisWMCRbsnhgmfPACiwWo26BR6r6Xs/6soc8ha7nrNgcKalef uhoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710865837; x=1711470637; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BaIq1+MZR0xG84qrX63u0cttvMj+WIfwQpAesDfuU9U=; b=v5JyGbtywIjptv/3EeiNI0jqlEisC936ddvfC7Vtb4dcoI5oVo1GsPx0Syxv2+M958 bO5sRDTEH7yvghkR/63atp1sSs+zzLe7Ke0fBY6q1L0vL0lhcxvBGyKQsac+NWjIE145 Ezom68Roy5Ek4TSos5piQUfa2PjCERbH/ahiBL/3pqONgpxTTWJZJp2d9dWOVaDFWhNH 5RmJJm5xvBypd50hRSt/k1e3Jqir2qXXHaqKvGjKvGCEzLdZ9toAdxgaakCgSZ3TXu8A f4Z8fv1pbtWaiXqt6PAQyN9l/WyriwzREZN76EI2KHsxLglCHUC7ukAhdXKblUaQ3BZZ ZFIg== X-Gm-Message-State: AOJu0YzTFxLOvlsG2YlqcE9iB/2DI44QlWckd8DG+q5w+7Ao8aukbdsi Z1OR7xIwr6UX2ZgLTE3Zea5ytHhDC8/QW5H/HzpvxlFclU61V8nbsk8YUTDW X-Google-Smtp-Source: AGHT+IGggl9bIFRQKUQLy6FRLmo83NcGOroqY9rSRH/lEvYGn2NOO/M0ZbaLMRrCV7+3AoldZ1y/zQ== X-Received: by 2002:a17:906:3987:b0:a46:ee3c:4b4a with SMTP id h7-20020a170906398700b00a46ee3c4b4amr10625eje.48.1710865836769; Tue, 19 Mar 2024 09:30:36 -0700 (PDT) Received: from mariano ([188.210.239.9]) by smtp.gmail.com with ESMTPSA id js22-20020a170906ca9600b00a46b8cd9b51sm2935260ejb.185.2024.03.19.09.30.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 09:30:36 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 9ECC6BFCDC; Tue, 19 Mar 2024 17:30:34 +0100 (CET) Date: Tue, 19 Mar 2024 17:30:34 +0100 From: Stefano Sabatini To: FFmpeg development discussions and patches , Marth64 Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , Marth64 References: <20240312154311.2345769-1-marth64@proxyid.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH v4] avcodec/mpeg12dec: extract only one type of CC substream 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: On date Tuesday 2024-03-12 18:10:09 +0100, Stefano Sabatini wrote: > On date Tuesday 2024-03-12 10:43:11 -0500, Marth64 wrote: > > In MPEG-2 user data, there can be different types of Closed Captions > > formats embedded (A53, SCTE-20, or DVD). The current behavior of the > > CC extraction code in the MPEG-2 decoder is to not be aware of > > multiple formats if multiple exist, therefore allowing one format > > to overwrite the other during the extraction process since the CC > > extraction shares one output buffer for the normalized bytes. > > > > This causes sources that have two CC formats to produce flawed output. > > There exist real-world samples which contain both A53 and SCTE-20 captions > > in the same MPEG-2 stream, and that manifest this problem. Example of symptom: > > THANK YOU (expected) --> THTHANANK K YOYOUU (actual) > > > > The solution is to pick only the first CC substream observed with valid bytes, > > and ignore the other types. Additionally, provide an option for users > > to manually "force" a type in the event that this matters for a particular > > source. > > > > Signed-off-by: Marth64 > > --- > > libavcodec/mpeg12dec.c | 64 ++++++++++++++++++++++++++++++++++++++++-- > > 1 file changed, 61 insertions(+), 3 deletions(-) > > LGTM. Applied. _______________________________________________ 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".