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 9B6174A45D for ; Thu, 28 Mar 2024 09:29:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8290368D736; Thu, 28 Mar 2024 11:29:34 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EA13668D462 for ; Thu, 28 Mar 2024 11:29:27 +0200 (EET) Authentication-Results: mail0.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=aLsGcoE0; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 9F0FB240DAC; Thu, 28 Mar 2024 10:29:27 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id r__ul8Asgk_e; Thu, 28 Mar 2024 10:29:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1711618166; bh=b0vZ3nVx6rSZUlQ+V7BEDN0QRZpKYDLI3XzX1DPnwP0=; h=Subject:From:To:Cc:In-Reply-To:References:Date:From; b=aLsGcoE0NFROiyGdxRqTqGgDfU4ZR2Vgb47bC077bA7SMFQZIUoQCu5fQu9yNk4P/ 9StuqvAwqYHMQ1PxpTU2dZnS1izsqztmnpSk6nqKDToulnSon9YSMtxz57j8ah7TJ5 xubq2oEFVASXWCB7Xjvi4ZdOlIEjrVLRK/sRpX+VC+pj0KcKqOM3mjkNdfEYJFqunG 3VK/ZalWhT7KwpB7Uzmd8hgDnvdL2iJG922U0jebqlFLTkHbbdr3iBpaiE57bvzlKQ ssZ7/ypoRoUXOf5XbhnG9lxjJutCi0ooRemqf5zGNHESky/C3R3ZMCTwsYmpFGBeJb n1HdXVEzmdmqQ== Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (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 "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id DE9682404AF; Thu, 28 Mar 2024 10:29:26 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id C9C031601B9; Thu, 28 Mar 2024 10:29:26 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240312060005.2111135-2-marth64@proxyid.net> References: <20240312060005.2111135-1-marth64@proxyid.net> <20240312060005.2111135-2-marth64@proxyid.net> Mail-Followup-To: FFmpeg development discussions and patches , Marth64 Date: Thu, 28 Mar 2024 10:29:26 +0100 Message-ID: <171161816680.7287.2434064355202452006@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v3 1/6] 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: Quoting Marth64 (2024-03-12 07:00:00) > 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. Is it not possible to extract all of them simultaneously? -- Anton Khirnov _______________________________________________ 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".