[vlc-devel] [PATCH 03/11] demux/mkv: replaced manual memory-management with `std::vector`
Filip Roséen
filip at videolabs.io
Thu Mar 3 15:33:39 CET 2016
Hugo Beauzée-Luyseen found an off-by-one error in the patch in which this email
is a reply to, see attachment for one that has fixed this issue.
The new patch effectively differs (in terms of result) from the previous patch
in the following way:
index 01ba53a..c49ddb0 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -848,7 +848,7 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
EbmlElement *el = NULL;
/* Start from the last known index instead of the beginning eachtime */
- if(index_idx())
+ if(index_idx() == 0)
es.I_O().setFilePointer( i_start_pos, seek_beginning );
else
es.I_O().setFilePointer( prev_index().i_position,
@@ -864,7 +864,7 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
{
cluster = kc_ptr;
i_cluster_pos = cluster->GetElementPosition();
- if( index_idx() ||
+ if( index_idx() == 0 ||
( prev_index().i_position < (int64_t)cluster->GetElementPosition() ) )
{
ParseCluster( cluster, false, SCOPE_NO_DATA );
@@ -1424,7 +1424,7 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
cluster->InitTimecode( uint64( *kct_ptr ), i_timescale );
/* add it to the index */
- if( index_idx() ||
+ if( index_idx() == 0 ||
( prev_index().i_position < (int64_t)cluster->GetElementPosition() ) )
{
IndexAppendCluster( cluster );
Thanks Hugo!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160303/5c2c449f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-demux-mkv-replaced-manual-memory-management-with-std.patch
Type: text/x-diff
Size: 15349 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160303/5c2c449f/attachment.patch>
More information about the vlc-devel
mailing list