diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sys/dvb/camutils.c | 15 |
2 files changed, 15 insertions, 7 deletions
@@ -1,3 +1,10 @@ +2008-02-14 Zaheer Abbas Merali <zaheerabbas at merali dot org> + + * sys/dvb/camutils.c: + Do not assume "descriptors" property in the pmt structure + is present. + Fixes #516499. + 2008-02-14 Wim Taymans <wim.taymans@collabora.co.uk> Patch by: Olivier Crete <tester@tester.ca> diff --git a/sys/dvb/camutils.c b/sys/dvb/camutils.c index f52412d7..1eb32175 100644 --- a/sys/dvb/camutils.c +++ b/sys/dvb/camutils.c @@ -231,13 +231,14 @@ cam_build_ca_pmt (GstStructure * pmt, guint8 list_management, guint8 cmd_id, gst_structure_get_uint (pmt, "version-number", &version_number); streams = gst_structure_get_value (pmt, "streams"); value = gst_structure_get_value (pmt, "descriptors"); - program_descriptors = g_value_get_boxed (value); - /* get the length of program level CA_descriptor()s */ - len = get_ca_descriptors_length (program_descriptors); - if (len > 0) - /* add one byte for the program level cmd_id */ - len += 1; - + if (value != NULL) { + program_descriptors = g_value_get_boxed (value); + /* get the length of program level CA_descriptor()s */ + len = get_ca_descriptors_length (program_descriptors); + if (len > 0) + /* add one byte for the program level cmd_id */ + len += 1; + } lengths = g_list_append (lengths, GINT_TO_POINTER (len)); body_size += 6 + len; |