From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id C686F4DB07
	for <ffmpegdev@gitmailbox.com>; Tue, 22 Apr 2025 21:44:39 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 29D16687DDD;
	Wed, 23 Apr 2025 00:44:30 +0300 (EEST)
Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com
 [209.85.160.48])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2DA99687ABB;
 Wed, 23 Apr 2025 00:44:13 +0300 (EEST)
Received: by mail-oa1-f48.google.com with SMTP id
 586e51a60fabf-2d540239367so776917fac.0; 
 Tue, 22 Apr 2025 14:44:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745358251; x=1745963051; darn=ffmpeg.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=EWKmeYb8ZRJDd2nThNCUAh23fZeQC1jzJz+IcGgvrRI=;
 b=m9csO8j8EsmAFTsdyvxaoI2tmjF3bWMIVfobVpJWijf1GJb9Wi4Jb9TamePwvATjA/
 yeawGZ3j8FGAeJ9GeCPdgmc+PSFySkH3GR9B8foDHMNTQpL1nYBA0ELyq7l74rUT6S7n
 ORWnnBAEjmnd1C9HtkzUWrK3jX99/ZDkRrmoIie3hyKVMkXfMtuvL9UT7AJ/3f3fHWQB
 jDa9wASlHr0IJR9Ejzqwsklj0pHnzBT13RqA3+95uwowan+iIMF9VZV892xYepcoquw7
 LepHoSM7vdi+eVRoT2SkhBSvnKCi5jE4Jsfd+WbaJrOXu1YTF0+aB/kJ8Oz6tEu0h9BE
 Fqbw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745358251; x=1745963051;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=EWKmeYb8ZRJDd2nThNCUAh23fZeQC1jzJz+IcGgvrRI=;
 b=Q8rCFI2MYtDOhvI2ZAuE9EPk4gowc7LEf3buN1Ay4uNAD/tjmqxHAN7Y1kX4x9veFv
 bwtlg1CqXBjjQofgaBQ/RMoj/5esX0Ylcqe4TfsCR9jzchs8QuZ1NIkuYJdDlXHrC1nk
 BRIj/YM23IGtXX94cJgACnI1b7lu5ZN4BDY/LwDZQZNDC9EGLiWViCTnmcKF9CsJ/13S
 HCzjEiU9mlfcYGUTQ8+p23amxYJorc6TxLwoJC+d3g5Yaql6QQj5tH7kM4jVC4bJsW+Q
 9NMEvz7coNXy6scxQMk5+s+db/GJ95J8qbwI4bzIyGpqCq2eIpB13Zb+0UM6MKQB/6Jf
 iLkA==
X-Forwarded-Encrypted: i=1;
 AJvYcCVra13Ts2UZTlv9Uf2PvWNT/L6J/M5Am58cQZ70mT04GKhijHMq2ZoEU4IhRCn0mlH4M/JRkEoD/0OKfel+6J0=@ffmpeg.org
X-Gm-Message-State: AOJu0YzNsc/XyG2iWA9IbbJz85Ax4VaV9JkiqXLwOkRNJfuRqyvplSmN
 c8qzibMF7Wv2nuSBK+HwGLtTO3iQHiF+fxcSUG4wsT55/y2L7CT4WheouIT2
X-Gm-Gg: ASbGncsBS40UHbyjJEg7jdARFwrrcRXpqRH/uwc9HolSu19wWGGZ96IEoht9Z3ZrA+a
 kYPvlpUbXg5chTQE1v1TN37GqphRZ2VkVAj00/C08NNXJXUaN8IBO0yhZ9TcUyOARrrmGoJ3k18
 Hf4RuXjOcharuElRUG4KoL4ObCKDkkMRgh0+OZYFcjy2+OsVsxJ9es8z/n8wVcAo4vgetuP7yAn
 DRWNwIo1QdCZHnGi2IknwAExbAPUmY6eJpddDwl0xQAqRWoHWi4McJQjNZPP4Vgzi+1B8vgGeVp
 3DOpBDscNQ/1GJ3PbY7pGFdNFVm7XS5qYSN8GjSHl/LMJ6dQqDA/vz1Ph45ZJs+tiCRlVLO9ijq
 Suu1tGJbg
X-Google-Smtp-Source: AGHT+IHpLRQXlBbno2QNdg9kJrCAXQUccfozAyidhcX+aoykbRiUypilZa3kvUKIOE9asBN8g1dYkg==
X-Received: by 2002:a05:6871:a411:b0:2cc:3530:d313 with SMTP id
 586e51a60fabf-2d526e52d97mr9577415fac.25.1745358251083; 
 Tue, 22 Apr 2025 14:44:11 -0700 (PDT)
Received: from mac.lan (ip72-211-125-114.no.no.cox.net. [72.211.125.114])
 by smtp.gmail.com with ESMTPSA id
 586e51a60fabf-2d52178ddcfsm2834427fac.38.2025.04.22.14.44.10
 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
 Tue, 22 Apr 2025 14:44:10 -0700 (PDT)
From: Romain Beauxis <romain.beauxis@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Date: Tue, 22 Apr 2025 16:44:06 -0500
Message-Id: <20250422214408.10102-1-romain.beauxis@gmail.com>
X-Mailer: git-send-email 2.39.5 (Apple Git-154)
MIME-Version: 1.0
Subject: [FFmpeg-devel] [PATCH 0/2] Remove chained ogg stream header packets
 from demuxer.
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: samples-request@ffmpeg.org, Romain Beauxis <romain.beauxis@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250422214408.10102-1-romain.beauxis@gmail.com/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

These patches remove the ogg header packets from secondary chainged ogg
streams from the demuxer.

First, a test utility is added to track what is currently happening with
chained streams.

Then the changes are introduced: the packet demuxing function is used to
explicitely tell the demuxer to skip header packets.

Also, the packet demuxing functions are adapted to properly copy extra
data from the new chained streams so that decoding can keep happening.

The diff from the test output makes it possible to follow what the
changes do to the extracted streams.

Test samples are available at: https://www.dropbox.com/scl/fo/xrtrna2rxr1j354hrtymq/AGwemlxHYecBLNmQ8Fsy--4?rlkey=lzilr4m9w4gfdqygoe172vvy8&dl=0

Romain Beauxis (2):
  tests: Add stream dump test API util, use it to dump stream data for
    chained ogg/{vorbis,opus,flac} streams.
  ogg/{vorbis,flac,opus}: Remove header packets from subsequent ogg
    streams from the demuxer output.

 libavformat/oggdec.c                       |  26 +--
 libavformat/oggdec.h                       |   6 +
 libavformat/oggparseflac.c                 |  28 +++-
 libavformat/oggparseopus.c                 |  12 ++
 libavformat/oggparsevorbis.c               |   4 +-
 tests/Makefile                             |   4 +
 tests/api/Makefile                         |   2 +-
 tests/api/api-dump-stream-meta-test.c      | 177 +++++++++++++++++++++
 tests/fate/ogg-flac.mak                    |  11 ++
 tests/fate/ogg-opus.mak                    |  11 ++
 tests/fate/ogg-vorbis.mak                  |  11 ++
 tests/ref/fate/ogg-flac-chained-meta.txt   |  10 ++
 tests/ref/fate/ogg-opus-chained-meta.txt   |  26 +++
 tests/ref/fate/ogg-vorbis-chained-meta.txt |  14 ++
 14 files changed, 326 insertions(+), 16 deletions(-)
 create mode 100644 tests/api/api-dump-stream-meta-test.c
 create mode 100644 tests/fate/ogg-flac.mak
 create mode 100644 tests/fate/ogg-opus.mak
 create mode 100644 tests/fate/ogg-vorbis.mak
 create mode 100644 tests/ref/fate/ogg-flac-chained-meta.txt
 create mode 100644 tests/ref/fate/ogg-opus-chained-meta.txt
 create mode 100644 tests/ref/fate/ogg-vorbis-chained-meta.txt

-- 
2.39.5 (Apple Git-154)

_______________________________________________
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".