mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
mpegtsbase: Avoid double removal of streams
This can happen if the PCR pid is the same as a audio/video PID.
This commit is contained in:
parent
b170b2020c
commit
2b127601e9
1 changed files with 8 additions and 1 deletions
|
@ -502,11 +502,18 @@ void
|
|||
mpegts_base_program_remove_stream (MpegTSBase * base,
|
||||
MpegTSBaseProgram * program, guint16 pid)
|
||||
{
|
||||
MpegTSBaseClass *klass = GST_MPEGTS_BASE_GET_CLASS (base);
|
||||
MpegTSBaseClass *klass;
|
||||
MpegTSBaseStream *stream = program->streams[pid];
|
||||
|
||||
GST_DEBUG ("pid:0x%04x", pid);
|
||||
|
||||
if (G_UNLIKELY (stream == NULL)) {
|
||||
/* Can happen if the PCR PID is the same as a audio/video PID */
|
||||
GST_DEBUG ("Stream already removed");
|
||||
return;
|
||||
}
|
||||
|
||||
klass = GST_MPEGTS_BASE_GET_CLASS (base);
|
||||
|
||||
/* If subclass needs it, inform it of the stream we are about to remove */
|
||||
if (klass->stream_removed)
|
||||
|
|
Loading…
Reference in a new issue