gst/mpegtsparse/mpegtsparse.c: Fix possible crash where pat is pointing to a freed structure.

Original commit message from CVS:
* gst/mpegtsparse/mpegtsparse.c:
Fix possible crash where pat is pointing to a freed structure.
This commit is contained in:
Zaheer Abbas Merali 2008-10-03 09:11:16 +00:00
parent 2d9d036a18
commit 67030c152b
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2008-10-03 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* gst/mpegtsparse/mpegtsparse.c:
Fix possible crash where pat is pointing to a freed structure.
2008-10-03 Stefan Kost <ensonic@users.sf.net>
* ext/metadata/metadata_mapping.htm:

View file

@ -248,8 +248,9 @@ mpegts_parse_reset (MpegTSParse * parse)
/* PAT */
g_hash_table_insert (parse->psi_pids,
GINT_TO_POINTER (0), GINT_TO_POINTER (1));
parse->pat = NULL;
/* pmt pids will be added and removed dynamically */
}
static void
@ -290,8 +291,10 @@ mpegts_parse_finalize (GObject * object)
MpegTSParse *parse = GST_MPEGTS_PARSE (object);
g_free (parse->program_numbers);
if (parse->pat)
if (parse->pat) {
gst_structure_free (parse->pat);
parse->pat = NULL;
}
g_hash_table_destroy (parse->programs);
g_hash_table_destroy (parse->psi_pids);