mpegtssection: Don't free empty streams
authorEdward Hervey <edward@centricular.com>
Thu, 24 Nov 2016 10:12:23 +0000 (11:12 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 24 Nov 2016 10:15:22 +0000 (11:15 +0100)
Also avoids a useless assertion

gst-libs/gst/mpegts/gstmpegtssection.c

index dc62ac3ee127c9c413cc96af71dcb97e08d64c58..dbbaa9e5004f93ae781cbc6468040463332059e7 100644 (file)
@@ -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);
 }