static void
_gst_mpegts_atsc_tvct_source_free (GstMpegTsAtscTVCTSource * source)
{
- g_ptr_array_unref (source->descriptors);
+ if (source->descriptors)
+ g_ptr_array_unref (source->descriptors);
g_slice_free (GstMpegTsAtscTVCTSource, source);
}
_gst_mpegts_atsc_tvct_free (GstMpegTsAtscTVCT * tvct)
{
g_ptr_array_unref (tvct->sources);
- g_ptr_array_unref (tvct->descriptors);
+ if (tvct->descriptors)
+ g_ptr_array_unref (tvct->descriptors);
g_slice_free (GstMpegTsAtscTVCT, tvct);
}
{
if (eit->start_time)
gst_date_time_unref (eit->start_time);
- g_ptr_array_unref (eit->descriptors);
+ if (eit->descriptors)
+ g_ptr_array_unref (eit->descriptors);
g_slice_free (GstMpegTsEITEvent, eit);
}
G_DEFINE_BOXED_TYPE (GstMpegTsEIT, gst_mpegts_eit,
(GBoxedCopyFunc) _gst_mpegts_eit_copy, (GFreeFunc) _gst_mpegts_eit_free);
-
static gpointer
_parse_eit (GstMpegTsSection * section)
{
static void
_gst_mpegts_bat_stream_free (GstMpegTsBATStream * bat)
{
- g_ptr_array_unref (bat->descriptors);
+ if (bat->descriptors)
+ g_ptr_array_unref (bat->descriptors);
g_slice_free (GstMpegTsBATStream, bat);
}
static void
_gst_mpegts_bat_free (GstMpegTsBAT * bat)
{
- g_ptr_array_unref (bat->descriptors);
- g_ptr_array_unref (bat->streams);
+ if (bat->descriptors)
+ g_ptr_array_unref (bat->descriptors);
+ if (bat->streams)
+ g_ptr_array_unref (bat->streams);
g_slice_free (GstMpegTsBAT, bat);
}
static void
_gst_mpegts_nit_stream_free (GstMpegTsNITStream * nit)
{
- g_ptr_array_unref (nit->descriptors);
+ if (nit->descriptors)
+ g_ptr_array_unref (nit->descriptors);
g_slice_free (GstMpegTsNITStream, nit);
}
static void
_gst_mpegts_nit_free (GstMpegTsNIT * nit)
{
- g_ptr_array_unref (nit->descriptors);
+ if (nit->descriptors)
+ g_ptr_array_unref (nit->descriptors);
g_ptr_array_unref (nit->streams);
g_slice_free (GstMpegTsNIT, nit);
}
static void
_gst_mpegts_sdt_service_free (GstMpegTsSDTService * sdt)
{
- g_ptr_array_unref (sdt->descriptors);
+ if (sdt->descriptors)
+ g_ptr_array_unref (sdt->descriptors);
g_slice_free (GstMpegTsSDTService, sdt);
}
{
if (tot->utc_time)
gst_date_time_unref (tot->utc_time);
- g_ptr_array_unref (tot->descriptors);
+ if (tot->descriptors)
+ g_ptr_array_unref (tot->descriptors);
g_slice_free (GstMpegTsTOT, tot);
}
static void
_gst_mpegts_pmt_stream_free (GstMpegTsPMTStream * pmt)
{
- g_ptr_array_unref (pmt->descriptors);
+ if (pmt->descriptors)
+ g_ptr_array_unref (pmt->descriptors);
g_slice_free (GstMpegTsPMTStream, pmt);
}
GstMpegTsPMT *copy;
copy = g_slice_dup (GstMpegTsPMT, pmt);
- copy->descriptors = g_ptr_array_ref (pmt->descriptors);
+ if (pmt->descriptors)
+ copy->descriptors = g_ptr_array_ref (pmt->descriptors);
copy->streams = g_ptr_array_ref (pmt->streams);
return copy;
static void
_gst_mpegts_pmt_free (GstMpegTsPMT * pmt)
{
- g_ptr_array_unref (pmt->descriptors);
+ if (pmt->descriptors)
+ g_ptr_array_unref (pmt->descriptors);
g_ptr_array_unref (pmt->streams);
g_slice_free (GstMpegTsPMT, pmt);
}