[vlc-commits] contrib: dvdread: fix cache not invalidated

Thomas Guillem git at videolan.org
Mon Jan 14 12:14:43 CET 2019


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jan 14 11:48:15 2019 +0100| [4fb09e103ce9160b2547dee0e1dcadaca901590a] | committer: Thomas Guillem

contrib: dvdread: fix cache not invalidated

(cherry picked from commit d4d2067e545c9f0825b7c9842c858e95714552fa)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4fb09e103ce9160b2547dee0e1dcadaca901590a
---

 ...01-Invalidate-cache-when-forcing-filesize.patch | 26 ++++++++++++++++++++++
 contrib/src/dvdread/rules.mak                      |  1 +
 2 files changed, 27 insertions(+)

diff --git a/contrib/src/dvdread/0001-Invalidate-cache-when-forcing-filesize.patch b/contrib/src/dvdread/0001-Invalidate-cache-when-forcing-filesize.patch
new file mode 100644
index 0000000000..db2be4ec57
--- /dev/null
+++ b/contrib/src/dvdread/0001-Invalidate-cache-when-forcing-filesize.patch
@@ -0,0 +1,26 @@
+From 978c6275c004db5485fb7ffde2508b89cc45c7f7 Mon Sep 17 00:00:00 2001
+From: Thomas Guillem <thomas at gllm.fr>
+Date: Tue, 8 Jan 2019 15:51:08 +0100
+Subject: [PATCH] Invalidate cache when forcing filesize
+
+This fixes playback of Resident Evil Extention DVD.
+---
+ src/dvd_reader.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/dvd_reader.c b/src/dvd_reader.c
+index 4e112d3..b700dd5 100644
+--- a/src/dvd_reader.c
++++ b/src/dvd_reader.c
+@@ -1332,6 +1332,8 @@ int DVDFileSeekForce(dvd_file_t *dvd_file, int offset, int force_size)
+       force_size = (offset - 1) / DVD_VIDEO_LB_LEN + 1;
+     if( dvd_file->filesize < force_size ) {
+       dvd_file->filesize = force_size;
++      free(dvd_file->cache);
++      dvd_file->cache = NULL;
+       fprintf(stderr, "libdvdread: Ignored size of file indicated in UDF.\n");
+     }
+   }
+-- 
+2.20.1
+
diff --git a/contrib/src/dvdread/rules.mak b/contrib/src/dvdread/rules.mak
index 2a69ee68e3..2dea43acf2 100644
--- a/contrib/src/dvdread/rules.mak
+++ b/contrib/src/dvdread/rules.mak
@@ -18,6 +18,7 @@ $(TARBALLS)/libdvdread-$(LIBDVDREAD_VERSION).tar.bz2:
 
 dvdread: libdvdread-$(LIBDVDREAD_VERSION).tar.bz2 .sum-dvdread
 	$(UNPACK)
+	$(APPLY) $(SRC)/dvdread/0001-Invalidate-cache-when-forcing-filesize.patch
 	cd $(UNPACK_DIR) && sed -i -e 's,Requires.private,Requires,g' misc/*.pc.in
 	$(MOVE)
 



More information about the vlc-commits mailing list