summaryrefslogtreecommitdiff
path: root/gst-libs/gst/mpegts
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2014-05-28 15:52:49 +0200
committerEdward Hervey <bilboed@bilboed.com>2014-05-28 15:55:40 +0200
commit6e1679b9cb446e5c4eda0fc0288023b641a4569a (patch)
tree331c85a79dbedb4a90141a76b4350da253f07f5b /gst-libs/gst/mpegts
parentca2847e234ab06900455e1328b9ce61b03c2f8a1 (diff)
downloadgstreamer-plugins-bad-6e1679b9cb446e5c4eda0fc0288023b641a4569a.tar.gz
mpegts: Make some fields optional
Some people might just not care about the contents
Diffstat (limited to 'gst-libs/gst/mpegts')
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index f4ea5944e..376e8cc6c 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -1608,8 +1608,8 @@ gst_mpegts_descriptor_parse_dvb_multilingual_component (const
* @descriptor: a %GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER #GstMpegTsDescriptor
* @private_data_specifier: (out): the private data specifier id
* registered by http://www.dvbservices.com/
- * @private_data: (out): additional data or NULL
- * @length: (out): length of %private_data
+ * @private_data: (out) (allow-none): additional data or NULL
+ * @length: (out) (allow-none): length of %private_data
*
* Parses out the private data specifier from the @descriptor.
*
@@ -1631,10 +1631,11 @@ gst_mpegts_descriptor_parse_dvb_private_data_specifier (const
*private_data_specifier = GST_READ_UINT32_BE (data);
- *length = descriptor->length - 4;
-
- *private_data = g_memdup (data + 4, *length);
+ if (length && private_data) {
+ *length = descriptor->length - 4;
+ *private_data = g_memdup (data + 4, *length);
+ }
return TRUE;
}