mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
gst/mpegtsparse/mpegtsparse.c: Actually copy the structure passed in when assigning it because it gets freed straight...
Original commit message from CVS: * gst/mpegtsparse/mpegtsparse.c: Actually copy the structure passed in when assigning it because it gets freed straight after the function call. Re: pat_info and pmt_info GstStructures.
This commit is contained in:
parent
478417da1a
commit
c3e91e1a88
3 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-10-06 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* gst/mpegtsparse/mpegtsparse.c:
|
||||
Actually copy the structure passed in when assigning it because
|
||||
it gets freed straight after the function call.
|
||||
Re: pat_info and pmt_info GstStructures.
|
||||
|
||||
2008-10-06 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
Patch by: Josep Torra
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 1ff63d8f92c36bf207434436f4ce75f2a4ea11a4
|
||||
Subproject commit ea93f2ed580bcc19322e4c07f677eda980c821eb
|
|
@ -851,7 +851,7 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GstStructure * pat_info)
|
|||
gchar *dbg;
|
||||
|
||||
old_pat = parse->pat;
|
||||
parse->pat = pat_info;
|
||||
parse->pat = gst_structure_copy (pat_info);
|
||||
|
||||
dbg = gst_structure_to_string (pat_info);
|
||||
GST_INFO_OBJECT (parse, "PAT %s", dbg);
|
||||
|
@ -975,14 +975,16 @@ mpegts_parse_apply_pmt (MpegTSParse * parse,
|
|||
for (i = 0; i < gst_value_list_get_size (old_streams); ++i) {
|
||||
value = gst_value_list_get_value (old_streams, i);
|
||||
stream = g_value_get_boxed (value);
|
||||
|
||||
gst_structure_get_uint (stream, "pid", &pid);
|
||||
gst_structure_get_uint (stream, "stream-type", &stream_type);
|
||||
mpegts_parse_program_remove_stream (parse, program, (guint16) pid);
|
||||
}
|
||||
|
||||
/* remove pcr stream */
|
||||
mpegts_parse_program_remove_stream (parse, program, program->pcr_pid);
|
||||
|
||||
gst_structure_free (program->pmt_info);
|
||||
program->pmt_info = NULL;
|
||||
}
|
||||
} else {
|
||||
/* no PAT?? */
|
||||
|
@ -992,7 +994,7 @@ mpegts_parse_apply_pmt (MpegTSParse * parse,
|
|||
}
|
||||
|
||||
/* activate new pmt */
|
||||
program->pmt_info = pmt_info;
|
||||
program->pmt_info = gst_structure_copy (pmt_info);
|
||||
program->pmt_pid = pmt_pid;
|
||||
program->pcr_pid = pcr_pid;
|
||||
mpegts_parse_program_add_stream (parse, program, (guint16) pcr_pid, -1);
|
||||
|
|
Loading…
Reference in a new issue