diff options
author | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2008-02-14 17:09:38 +0000 |
---|---|---|
committer | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2008-02-14 17:09:38 +0000 |
commit | 4194e04a46274cb69a3c51d272c5806033fe6a33 (patch) | |
tree | 9f33ccba648950429b29fd65aec0b593960c6596 | |
parent | c5b175a6890115ba3f30520f844e10b841a92258 (diff) | |
download | gst-plugins-bad-4194e04a46274cb69a3c51d272c5806033fe6a33.tar.gz gst-plugins-bad-4194e04a46274cb69a3c51d272c5806033fe6a33.tar.bz2 gst-plugins-bad-4194e04a46274cb69a3c51d272c5806033fe6a33.zip |
sys/dvb/camutils.c: Do not assume "descriptors" property in the pmt structure is present.
Original commit message from CVS:
* sys/dvb/camutils.c:
Do not assume "descriptors" property in the pmt structure
is present.
Fixes #516499.
-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; |