From d1fa342b71be439105bef9836153b47ff3431934 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 24 Nov 2016 11:12:23 +0100 Subject: [PATCH] mpegtssection: Don't free empty streams Also avoids a useless assertion --- gst-libs/gst/mpegts/gstmpegtssection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c index dc62ac3ee1..dbbaa9e500 100644 --- a/gst-libs/gst/mpegts/gstmpegtssection.c +++ b/gst-libs/gst/mpegts/gstmpegtssection.c @@ -632,7 +632,8 @@ _gst_mpegts_pmt_free (GstMpegtsPMT * pmt) { if (pmt->descriptors) g_ptr_array_unref (pmt->descriptors); - g_ptr_array_unref (pmt->streams); + if (pmt->streams) + g_ptr_array_unref (pmt->streams); g_slice_free (GstMpegtsPMT, pmt); }