[vlc-devel] [PATCH 5/7] demux: mkv: use dynamic_cast for downcasting
Zhao Zhili
quinkblack at foxmail.com
Mon May 28 09:00:40 CEST 2018
---
modules/demux/mkv/Ebml_parser.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 4a9325b..76bc45a 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -209,7 +209,8 @@ next:
if( m_el[mi_level] == NULL )
{
- if ( i_max_read != UINT64_MAX && !static_cast<vlc_stream_io_callback *>(&m_es->I_O())->IsEOF() )
+ vlc_stream_io_callback *io_callback = dynamic_cast<vlc_stream_io_callback *>(&m_es->I_O());
+ if ( i_max_read != UINT64_MAX && io_callback != NULL && !io_callback->IsEOF() )
{
msg_Dbg(p_demux, "found nothing, go up");
i_ulev = 1;
--
2.9.5
More information about the vlc-devel
mailing list