[vlc-commits] demux:mkv: don't check if a track is selected if it has no ES

Steve Lhomme git at videolan.org
Mon Jul 9 11:44:06 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun 29 16:07:30 2018 +0200| [439f9cd22b27d1a2b9acd9e5c9ac1a209e3f247b] | committer: Jean-Baptiste Kempf

demux:mkv: don't check if a track is selected if it has no ES

(cherry picked from commit 01737e895f5f83eadcab6e32996324f2cc482561)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=439f9cd22b27d1a2b9acd9e5c9ac1a209e3f247b
---

 modules/demux/mkv/matroska_segment.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index a99b298fb1..93647113f8 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -825,7 +825,10 @@ bool matroska_segment_c::Seek( demux_t &demuxer, mtime_t i_absolute_mk_date, mti
         track.i_last_dts        = VLC_TS_INVALID;
 
         bool selected;
-        es_out_Control( demuxer.out, ES_OUT_GET_ES_STATE, track.p_es, &selected );
+        if (track.p_es == NULL)
+            selected = false;
+        else
+            es_out_Control( demuxer.out, ES_OUT_GET_ES_STATE, track.p_es, &selected );
         if ( selected )
             selected_tracks.push_back( track.i_number );
     }



More information about the vlc-commits mailing list