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 3997C49E6B for ; Tue, 12 Mar 2024 17:10:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 61AF568D1A1; Tue, 12 Mar 2024 19:10:19 +0200 (EET) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E98A668CD84 for ; Tue, 12 Mar 2024 19:10:12 +0200 (EET) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5683093ffbbso6643909a12.1 for ; Tue, 12 Mar 2024 10:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710263411; x=1710868211; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=dSVF/2DDe00cqATV8wY4CF6P60QkJpMJFEfhhlpgVvw=; b=T6ZtyNizGo/lYMoYUyDnTCCLUgOACg0nnX0rw3S94Mdt7AbmDdehH5nyiPur9Eh1jz F/Cu7Do1z7+43Q3YsY9rG2/MBJpVUUDtmIAmE5KpDnvKWiQBoacrLWFZffVcPzaMGOfu sInUzLCUwHRBT3pihBkEumre1p8ajG9yQ7bvwBqzJKv4eu5KlDsOkPkb0jh+tQfTyMaw K5BoFsU1pV8lh0i/yjpqhNB3UO2ElWPOgxNX4g2GzQ2kY7chV5UuufAcIOI8xPfUmJV6 T7omodP/CLsrQPoOS6lbJmDEEPQHR9H/xMfqbOwjcvMVoKqmfJtDo6CTZkvJxsxSR7OO /maQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710263411; x=1710868211; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dSVF/2DDe00cqATV8wY4CF6P60QkJpMJFEfhhlpgVvw=; b=kJnP+PZZXTwFHLXOZ2z6W1CeHzSFI7Dj05hpJv64ZKrxHt5dXuTb8vgHbcVgUtUgrs vWww27/2rhvf5eQFYhHnJBDAxWZd9keUh0w0cIYHz/aTjd5s2T2+NkcDCWBL1ToJ0IOx 5sWXMjNuXQLRJNW+YuLH7Mukk918G/54kZPHCBEsKePnOQHvRKH7xb2VHtsAivYePmYX k7HnEsi5ALEfd/ytumq3G5tdbyuOhE2RkDuf1NeQ8srxVgXmpIooin/ck0/3WsBc/ecY 8//5TMu0rrcK0hgIT6bfYlQa8U9JHJcDRWEdeUpPelr1Bqg4GXeF0bgLxLJfqUO7lC+7 g0mw== X-Gm-Message-State: AOJu0YwqnLUpiADPyo7eFmhITX+9UScodUT2sdui4JeEzdA2cwE2GIFJ DnqkB9zBGwip5WBdemb2gyGEaQSuABixb70oFIZ202P/Mq/IoaS5TyaNKA3Q X-Google-Smtp-Source: AGHT+IEFaHq2JR5C/Ocjg+/42shJmBGRG+WZbauNpV9Rfxta6Gx5aoWWcE/wOr09IVeSW8iJzbxiCw== X-Received: by 2002:a17:907:1603:b0:a44:6e05:ea5 with SMTP id cw3-20020a170907160300b00a446e050ea5mr6170182ejd.1.1710263411132; Tue, 12 Mar 2024 10:10:11 -0700 (PDT) Received: from mariano ([188.210.239.79]) by smtp.gmail.com with ESMTPSA id bk2-20020a170906b0c200b00a44ef54b6b6sm4004324ejb.58.2024.03.12.10.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 10:10:10 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id C4439BFCDC; Tue, 12 Mar 2024 18:10:09 +0100 (CET) Date: Tue, 12 Mar 2024 18:10:09 +0100 From: Stefano Sabatini To: FFmpeg development discussions and patches 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: <20240312154311.2345769-1-marth64@proxyid.net> 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 Cc: Marth64 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 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. _______________________________________________ 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".