liquidsoap/liquidsoap-2.2.0-ocaml-flac-0.4.0.patch

49 lines
1.5 KiB
Diff
Raw Permalink Normal View History

From 8bb250fe2d2575e2eb8926b491849f47dd68e174 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <toots@rastageeks.org>
Date: Tue, 4 Jul 2023 12:04:11 -0500
Subject: [PATCH] Adapt to new flac decoder API.
---
src/core/decoder/ogg_flac_duration.ml | 4 ++--
tests/streams/dune | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/core/decoder/ogg_flac_duration.ml b/src/core/decoder/ogg_flac_duration.ml
index 196456c676..36293a70c4 100644
--- a/src/core/decoder/ogg_flac_duration.ml
+++ b/src/core/decoder/ogg_flac_duration.ml
@@ -44,8 +44,8 @@ let duration ~metadata:_ file =
let page = Ogg.Sync.read sync in
if Ogg.Page.serialno page = serial then Ogg.Stream.put_page os page
in
- let callbacks = Flac_ogg.Decoder.get_callbacks (fun _ -> ()) in
- let dec = Flac_ogg.Decoder.create packet os in
+ let callbacks = Flac_ogg.Decoder.get_callbacks os (fun _ -> ()) in
+ let dec = Flac.Decoder.create callbacks in
let rec info () =
try Flac.Decoder.init dec callbacks
with Ogg.Not_enough_data ->
diff --git a/tests/streams/dune b/tests/streams/dune
index 250c9158dc..95b518a68a 100644
--- a/tests/streams/dune
+++ b/tests/streams/dune
@@ -173,6 +173,10 @@
(rule
(alias citest)
(target playlist)
+ (deps
+ ./file1.mp3
+ ./file2.mp3
+ ./file3.mp3)
(action
(with-stdout-to
%{target}
@@ -181,6 +185,7 @@
(rule
(alias citest)
(target huge_playlist)
+ (deps ./file1.mp3)
(action
(with-stdout-to
%{target}