mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
mpegtsbase: Fix when applying new PMT with same program number
When the sub-class is delaying deactivation of the old program, but it has the same program number as the new program, don't overwrite the old program in the hash table and then steal the new program back out of it. Instead, add the new program to the hash table after handling removal of the old one.
This commit is contained in:
parent
5115eadc46
commit
d6ea4d83f2
1 changed files with 3 additions and 2 deletions
|
@ -886,8 +886,6 @@ mpegts_base_apply_pmt (MpegTSBase * base, GstMpegtsSection * section)
|
|||
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);
|
||||
|
||||
/* Desactivate the old program */
|
||||
/* FIXME : THIS IS BREAKING THE STREAM SWITCHING LOGIC !
|
||||
|
@ -901,6 +899,9 @@ mpegts_base_apply_pmt (MpegTSBase * base, GstMpegtsSection * section)
|
|||
g_hash_table_steal (base->programs,
|
||||
GINT_TO_POINTER ((gint) old_program->program_number));
|
||||
}
|
||||
/* Add new program to the programs we track */
|
||||
g_hash_table_insert (base->programs,
|
||||
GINT_TO_POINTER (program_number), program);
|
||||
initial_program = FALSE;
|
||||
} else
|
||||
program = old_program;
|
||||
|
|
Loading…
Reference in a new issue