mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 00:32:43 +00:00
tsdemux: do not keep a dangling pointer
When removing the current program, it will get freed by the hash table removal callback, so ensure we clear our pointer to it. Fixes a crash later on in gst_ts_demux_push trying to access it. https://bugzilla.gnome.org/show_bug.cgi?id=656927
This commit is contained in:
parent
d1a6ca2203
commit
b19a5ea1f3
1 changed files with 2 additions and 0 deletions
|
@ -1590,6 +1590,7 @@ find_timestamps (MpegTSBase * base, guint64 initoff, guint64 * offset)
|
|||
gst_structure_free (base->pat);
|
||||
base->pat = NULL;
|
||||
mpegts_base_remove_program (base, demux->current_program_number);
|
||||
demux->program = NULL;
|
||||
|
||||
/* Find end position */
|
||||
if (G_UNLIKELY (!gst_pad_query_peer_duration (base->sinkpad, &format,
|
||||
|
@ -1648,6 +1649,7 @@ beach:
|
|||
base->pat = NULL;
|
||||
}
|
||||
mpegts_base_remove_program (base, demux->current_program_number);
|
||||
demux->program = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue