From c6a6149e738799959aac0fb200b7770de3fdc610 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 4 Jul 2006 12:55:43 +0000 Subject: [PATCH] * modules/demux/mkv.cpp: fixed a pointer cast bug. --- modules/demux/mkv.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp index a86f299174..99166bfaff 100644 --- a/modules/demux/mkv.cpp +++ b/modules/demux/mkv.cpp @@ -5264,18 +5264,23 @@ void demux_sys_t::JumpTo( virtual_segment_c & vsegment, chapter_item_c * p_chapt bool matroska_segment_c::CompareSegmentUIDs( const matroska_segment_c * p_item_a, const matroska_segment_c * p_item_b ) { + EbmlBinary *p_tmp; + if ( p_item_a == NULL || p_item_b == NULL ) return false; - EbmlBinary * p_itema = (EbmlBinary *)(p_item_a->p_segment_uid); - if ( p_item_b->p_prev_segment_uid != NULL && *p_itema == *p_item_b->p_prev_segment_uid ) + p_tmp = (EbmlBinary *)p_item_a->p_segment_uid; + if ( p_item_b->p_prev_segment_uid != NULL + && *p_tmp == *p_item_b->p_prev_segment_uid ) return true; - p_itema = (EbmlBinary *)(&p_item_a->p_next_segment_uid); - if ( p_item_b->p_segment_uid != NULL && *p_itema == *p_item_b->p_segment_uid ) + p_tmp = (EbmlBinary *)p_item_a->p_next_segment_uid; + if ( p_item_b->p_segment_uid != NULL + && *p_tmp == *p_item_b->p_segment_uid ) return true; - if ( p_item_b->p_prev_segment_uid != NULL && *p_itema == *p_item_b->p_prev_segment_uid ) + if ( p_item_b->p_prev_segment_uid != NULL + && *p_tmp == *p_item_b->p_prev_segment_uid ) return true; return false; -- 2.39.2