mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-28 06:42:16 +00:00
tsdemux: fix refcounting when applying a new PMT
A new program object is created to replace an existing one in the programs hash table, so its refcount needs to match. With the default of 0 refcount on creation, the next PAT change will cause that refcount to be both incremented and decremented (assuming the new PAT references that stream too), which will cause the program to be destroyed. https://bugzilla.gnome.org/show_bug.cgi?id=748412
This commit is contained in:
parent
d625770a18
commit
29fd6332a4
1 changed files with 1 additions and 0 deletions
|
@ -856,6 +856,7 @@ mpegts_base_apply_pmt (MpegTSBase * base, GstMpegtsSection * section)
|
|||
if (old_program->active) {
|
||||
old_program = mpegts_base_steal_program (base, program_number);
|
||||
program = mpegts_base_new_program (base, program_number, section->pid);
|
||||
program->patcount = old_program->patcount;
|
||||
g_hash_table_insert (base->programs,
|
||||
GINT_TO_POINTER (program_number), program);
|
||||
|
||||
|
|
Loading…
Reference in a new issue