From d466f07def637e6f6be8e1fb5ff2120ed5096ff9 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 14 Feb 2011 17:49:54 +0100 Subject: [PATCH] matroskademux: avoid sorting NULL array of cluster positions --- gst/matroska/matroska-demux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 7643119..52f1467 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -5482,7 +5482,8 @@ gst_matroska_demux_parse_contents (GstMatroskaDemux * demux, GstEbmlRead * ebml) DEBUG_ELEMENT_STOP (demux, ebml, "SeekHead", ret); /* Sort clusters by position for easier searching */ - g_array_sort (demux->clusters, (GCompareFunc) gst_matroska_cluster_compare); + if (demux->clusters) + g_array_sort (demux->clusters, (GCompareFunc) gst_matroska_cluster_compare); return ret; } -- 2.7.4