[vlc-commits] demux:mkv: unmark the EOF if the seek failed and we're still in usable data
Steve Lhomme
git at videolan.org
Fri Feb 2 17:03:17 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at 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 ) )
{
More information about the vlc-commits
mailing list