[vlc-commits] se/archive: fix seeking with SEEK_END

Pierre Lamot git at videolan.org
Fri Dec 1 17:27:46 CET 2017


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Dec  1 17:21:43 2017 +0100| [777514b42f0a3cea41fef9ee770831be03adeac5] | committer: Thomas Guillem

se/archive: fix seeking with SEEK_END

Fixes #19133

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=777514b42f0a3cea41fef9ee770831be03adeac5
---

 modules/stream_extractor/archive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index 9796d0b7bd..4fdb3b1378 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -167,7 +167,7 @@ static la_int64_t libarchive_seek_cb( libarchive_t* p_arc, void* p_obj,
     {
         case SEEK_SET: whence_pos = 0;                           break;
         case SEEK_CUR: whence_pos = vlc_stream_Tell( p_source ); break;
-        case SEEK_END: whence_pos = stream_Size( p_source ) - 1; break;
+        case SEEK_END: whence_pos = stream_Size( p_source ); break;
               default: vlc_assert_unreachable();
 
     }



More information about the vlc-commits mailing list