From c3061f434ba622b121499fed6eade88da97f61cb Mon Sep 17 00:00:00 2001 From: Anton Belka Date: Thu, 21 Jun 2012 17:15:11 +0300 Subject: [PATCH] matroskademux: Return FALSE from TOC query if no TOC exists instead of an empty TOC --- gst/matroska/matroska-demux.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index bfdbbb4588..78cb2f676c 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -1433,17 +1433,16 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad, case GST_QUERY_TOC: { - GstToc *toc; + GstToc *toc = NULL; GST_OBJECT_LOCK (demux); - if (demux->common.toc) + if (demux->common.toc) { toc = demux->common.toc; - else - toc = gst_toc_new (); + res = TRUE; + } else { + res = FALSE; + } gst_query_set_toc (query, toc, 0); - res = TRUE; - if (!demux->common.toc) - gst_toc_unref (toc); GST_OBJECT_UNLOCK (demux); break; }