mkv: fix crash when seek includes tracks without ES out
authorFilip Roséen <filip@videolabs.io>
Fri, 13 May 2016 13:34:42 +0000 (15:34 +0200)
committerThomas Guillem <thomas@gllm.fr>
Fri, 13 May 2016 13:41:32 +0000 (15:41 +0200)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/demux/mkv/matroska_segment.cpp

index 85a9c55..ac5af66 100644 (file)
@@ -823,9 +823,9 @@ void matroska_segment_c::Seek( mtime_t i_absolute_mk_date, mtime_t i_mk_time_off
         track.i_last_dts        = it->second.pts;
 
 
-        bool is_active;
+        bool is_active = false;
 
-        if( es_out_Control( sys.demuxer.out, ES_OUT_GET_ES_STATE, track.p_es, &is_active ) )
+        if( track.p_es && es_out_Control( sys.demuxer.out, ES_OUT_GET_ES_STATE, track.p_es, &is_active ) )
         {
             msg_Err( &sys.demuxer, "Unable to query track %u for ES_OUT_GET_ES_STATE", it->first );
         }