From 2f83ed90d0aea767b44629e26c4d73102d17d6be Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 31 May 2019 18:40:24 +0200 Subject: [PATCH] archive/iso9660: implement seeking --- NEWS | 2 ++ src/archive/plugins/Iso9660ArchivePlugin.cxx | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 16f13c9cd..5208f9085 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ ver 0.22 (not yet released) - new tag "Grouping" (for ID3 "TIT1") * input - ffmpeg: allow partial reads +* archive + - iso9660: support seeking * filter - ffmpeg: new plugin based on FFmpeg's libavfilter library - hdcd: new plugin based on FFmpeg's "af_hdcd" for HDCD playback diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx index 32ebd78c2..393f45a1c 100644 --- a/src/archive/plugins/Iso9660ArchivePlugin.cxx +++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx @@ -148,6 +148,7 @@ public: :InputStream(_uri, _mutex), iso(_iso), statbuf(_statbuf) { size = statbuf->size; + seekable = true; SetReady(); } @@ -159,6 +160,10 @@ public: bool IsEOF() const noexcept override; size_t Read(std::unique_lock &lock, void *ptr, size_t size) override; + + void Seek(std::unique_lock &, offset_type new_offset) override { + offset = new_offset; + } }; InputStreamPtr