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 5A77246587 for ; Wed, 21 Jun 2023 08:32:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 515AD68C049; Wed, 21 Jun 2023 11:32:24 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D79A68AFA8 for ; Wed, 21 Jun 2023 11:32:18 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id DE2132404EC; Wed, 21 Jun 2023 10:32:17 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id KWrkH1vCBYC6; Wed, 21 Jun 2023 10:32:15 +0200 (CEST) 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 9299B2404EA; Wed, 21 Jun 2023 10:32:15 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 845BB1601B2; Wed, 21 Jun 2023 10:32:15 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20230620050932.85936-1-toots@rastageeks.org> References: <20230620050932.85936-1-toots@rastageeks.org> Mail-Followup-To: FFmpeg development discussions and patches , Romain Beauxis Date: Wed, 21 Jun 2023 10:32:15 +0200 Message-ID: <168733633551.21886.11704774345114900976@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] libavformat/mpegts.c: fix hardcoded 5-bytes skip for metadata streams. 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: Romain Beauxis 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 toots@rastageeks.org (2023-06-20 07:09:33) > From: Romain Beauxis > > Before the introduction of AV_CODEC_ID_TIMED_ID3 for timed_id3 metadata streams > in mpegts (commit 4a4437c0fbc8f7afe0c533070395a42e56b4ee75), AV_CODEC_ID_SMPTE_KLV > was the only existing codec for metadata. > > It seems that this codec has a 5-bytes metadata header[1] that, for some reason, > was always skipped when decoding data packets. > > However, when working with a AV_CODEC_ID_TIMED_ID3 streams, this results in the > 5 first bytes of the payload being cut-off, which includes essential informations > such as the ID3 tag version. > > This patch fixes the issue by keeping the 5-bytes skip only for AV_CODEC_ID_SMPTE_KLV > streams. > > To test: > 1. download this file: https://www.dropbox.com/s/jy8sih3pe8qskxb/bla.ts?dl=1 > > This file was download from: http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 > > 2. run this command: > ffprobe -show_streams -select_streams 0 -show_packets -show_private_data \ > -show_data /path/to/bla.ts > > Before: > [PACKET] > codec_type=data > stream_index=0 > pts=494646418 > pts_time=5496.071311 > dts=494646418 > dts_time=5496.071311 > duration=N/A > duration_time=N/A > size=21 > pos=482784 > flags=K__ > data= > 00000000: 0000 0000 1054 4954 3200 0000 0600 0003 .....TIT2....... > 00000010: 7465 7374 00 test. > > After: > [PACKET] > codec_type=data > stream_index=0 > pts=494646418 > pts_time=5496.071311 > dts=494646418 > dts_time=5496.071311 > duration=N/A > duration_time=N/A > size=26 > pos=482784 > flags=K__ > data= > 00000000: 4944 3304 0000 0000 0010 5449 5432 0000 ID3.......TIT2.. > 00000010: 0006 0000 0374 6573 7400 .....test. A FATE test for this would be nice. -- 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".