[vlc-commits] Fix a crash in MKV when seeking to the last block of a cluster
Denis Charmet
git at videolan.org
Fri Dec 9 18:10:21 CET 2011
vlc/vlc-1.2 | branch: master | Denis Charmet <typx at dinauz.org> | Tue Dec 6 23:38:15 2011 +0100| [f484b261e7a1ed82dd2844379d5a09518750d356] | committer: Jean-Baptiste Kempf
Fix a crash in MKV when seeking to the last block of a cluster
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 75fe29de25652698275aeaf9e6e831d24683659d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=f484b261e7a1ed82dd2844379d5a09518750d356
---
modules/demux/mkv/Ebml_parser.cpp | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 69676bf..6c3aa67 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -88,10 +88,13 @@ EbmlElement* EbmlParser::UnGet( uint64 i_block_pos, uint64 i_cluster_pos )
{
// seek to the previous Cluster
m_es->I_O().setFilePointer( i_cluster_pos, seek_beginning );
- mi_level--;
- mi_user_level--;
- delete m_el[mi_level];
- m_el[mi_level] = NULL;
+ while(mi_level > 1)
+ {
+ mi_level--;
+ mi_user_level--;
+ delete m_el[mi_level];
+ m_el[mi_level] = NULL;
+ }
return NULL;
}
}
More information about the vlc-commits
mailing list