[vlc-commits] Allow Ebml elements bigger than 64GB
Denis Charmet
git at videolan.org
Fri Jan 27 01:17:20 CET 2012
vlc/vlc-2.0 | branch: master | Denis Charmet <typx at dinauz.org> | Thu Jan 26 22:55:16 2012 +0100| [c2c945cb5ce68bda9eb9af58d9a17fc365dfc4ce] | committer: Jean-Baptiste Kempf
Allow Ebml elements bigger than 64GB
Should fix #5919
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit c8b78f40656684c8b55fbd059c37850e2d0a3e41)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=c2c945cb5ce68bda9eb9af58d9a17fc365dfc4ce
---
modules/demux/mkv/demux.cpp | 9 +++++----
modules/demux/mkv/stream_io_callback.cpp | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 8d4d25a..0bcc0bc 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -24,7 +24,7 @@
*****************************************************************************/
#include "demux.hpp"
-
+#include "stream_io_callback.hpp"
#include "Ebml_parser.hpp"
event_thread_t::event_thread_t(demux_t *p_demux) : p_demux(p_demux)
@@ -463,7 +463,8 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS
bool b_keep_stream = false, b_keep_segment = false;
// verify the EBML Header
- p_l0 = p_estream->FindNextID(EBML_INFO(EbmlHead), 0xFFFFFFFFL);
+ vlc_stream_io_callback & io_stream = (vlc_stream_io_callback &) p_estream->I_O();
+ p_l0 = p_estream->FindNextID(EBML_INFO(EbmlHead), io_stream.toRead());
if (p_l0 == NULL)
{
msg_Err( p_demux, "No EBML header found" );
@@ -491,7 +492,7 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS
// find all segments in this file
- p_l0 = p_estream->FindNextID(EBML_INFO(KaxSegment), 0xFFFFFFFFFLL);
+ p_l0 = p_estream->FindNextID(EBML_INFO(KaxSegment), io_stream.toRead());
if (p_l0 == NULL)
{
return NULL;
@@ -565,7 +566,7 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS
if (p_l0->IsFiniteSize() )
{
p_l0->SkipData(*p_estream, KaxMatroska_Context);
- p_l0 = p_estream->FindNextID(EBML_INFO(KaxSegment), 0xFFFFFFFFL);
+ p_l0 = p_estream->FindNextID(EBML_INFO(KaxSegment), io_stream.toRead());
}
else
{
diff --git a/modules/demux/mkv/stream_io_callback.cpp b/modules/demux/mkv/stream_io_callback.cpp
index 2fff1ef..dd0817c 100644
--- a/modules/demux/mkv/stream_io_callback.cpp
+++ b/modules/demux/mkv/stream_io_callback.cpp
@@ -97,7 +97,7 @@ uint64 vlc_stream_io_callback::toRead( void )
stream_Control( s, STREAM_GET_SIZE, &i_size );
if( i_size == 0 )
- return 0xFFFFFFFFL;
+ return UINT64_MAX;
return (uint64) i_size - stream_Tell( s );
}
More information about the vlc-commits
mailing list