vlc | branch: master | Steve Lhomme <rob...@videolabs.io> | Fri Feb  2 16:24:26 
2018 +0100| [42b2aee790300d175c2141657d47c325442213c2] | committer: Steve Lhomme

demux:mkv: unmark the EOF if the seek failed and we're still in usable data

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

 modules/demux/mkv/stream_io_callback.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/demux/mkv/stream_io_callback.cpp 
b/modules/demux/mkv/stream_io_callback.cpp
index 570229e262..6a50745f13 100644
--- a/modules/demux/mkv/stream_io_callback.cpp
+++ b/modules/demux/mkv/stream_io_callback.cpp
@@ -64,7 +64,16 @@ void vlc_stream_io_callback::setFilePointer(int64_t 
i_offset, seek_mode mode )
     }
 
     if(i_pos == i_current)
+    {
+        if (mb_eof)
+        {
+            // if previous setFilePointer() failed we may be back in the 
available data
+            i_size = stream_Size( s );
+            if ( i_size != 0 && i_pos < i_size )
+                mb_eof = vlc_stream_Seek( s, i_pos ) != VLC_SUCCESS;
+        }
         return;
+    }
 
     if( i_pos < 0 || ( ( i_size = stream_Size( s ) ) != 0 && i_pos >= i_size ) 
)
     {

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to