Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dvblast
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
dvblast
Commits
77d8a50e
Commit
77d8a50e
authored
Nov 02, 2009
by
Marian Ďurkovič
Committed by
Christophe Massiot
Nov 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* demux.c: Fix program cleanup when new PAT removes a program.
parent
f2491f9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
56 deletions
+49
-56
demux.c
demux.c
+49
-56
No files found.
demux.c
View file @
77d8a50e
...
@@ -488,9 +488,7 @@ static void StopPID( output_t *p_output, uint16_t i_pid )
...
@@ -488,9 +488,7 @@ static void StopPID( output_t *p_output, uint16_t i_pid )
}
}
}
}
if
(
j
==
p_pids
[
i_pid
].
i_nb_outputs
)
if
(
j
!=
p_pids
[
i_pid
].
i_nb_outputs
)
msg_Warn
(
NULL
,
"unselecting an unselected PID %d"
,
i_pid
);
else
{
{
p_pids
[
i_pid
].
pp_outputs
[
j
]
=
NULL
;
p_pids
[
i_pid
].
pp_outputs
[
j
]
=
NULL
;
UnsetPID
(
i_pid
);
UnsetPID
(
i_pid
);
...
@@ -1019,6 +1017,52 @@ void demux_ResendCAPMTs( void )
...
@@ -1019,6 +1017,52 @@ void demux_ResendCAPMTs( void )
en50221_AddPMT
(
pp_sids
[
i
]
->
p_current_pmt
);
en50221_AddPMT
(
pp_sids
[
i
]
->
p_current_pmt
);
}
}
/*****************************************************************************
* DeleteProgram
*****************************************************************************/
static
void
DeleteProgram
(
dvbpsi_pat_program_t
*
p_program
)
{
int
i_pmt
;
UnselectPSI
(
p_program
->
i_number
,
p_program
->
i_pid
);
for
(
i_pmt
=
0
;
i_pmt
<
i_nb_sids
;
i_pmt
++
)
{
if
(
pp_sids
[
i_pmt
]
->
i_sid
==
p_program
->
i_number
)
{
dvbpsi_pmt_t
*
p_pmt
=
pp_sids
[
i_pmt
]
->
p_current_pmt
;
if
(
p_pmt
!=
NULL
)
{
dvbpsi_pmt_es_t
*
p_es
;
if
(
i_ca_handle
&&
SIDIsSelected
(
p_program
->
i_number
)
&&
PMTNeedsDescrambling
(
p_pmt
)
)
en50221_DeletePMT
(
p_pmt
);
if
(
p_pmt
->
i_pcr_pid
!=
PADDING_PID
&&
p_pmt
->
i_pcr_pid
!=
pp_sids
[
i_pmt
]
->
i_pmt_pid
)
UnselectPID
(
p_program
->
i_number
,
p_pmt
->
i_pcr_pid
);
for
(
p_es
=
p_pmt
->
p_first_es
;
p_es
!=
NULL
;
p_es
=
p_es
->
p_next
)
{
if
(
PIDWouldBeSelected
(
p_es
)
)
UnselectPID
(
p_program
->
i_number
,
p_es
->
i_pid
);
}
dvbpsi_DeletePMT
(
p_pmt
);
}
pp_sids
[
i_pmt
]
->
p_current_pmt
=
NULL
;
pp_sids
[
i_pmt
]
->
i_sid
=
0
;
pp_sids
[
i_pmt
]
->
i_pmt_pid
=
0
;
dvbpsi_DetachPMT
(
pp_sids
[
i_pmt
]
->
p_dvbpsi_handle
);
break
;
}
}
}
/*****************************************************************************
/*****************************************************************************
* dvbpsi callbacks
* dvbpsi callbacks
*****************************************************************************/
*****************************************************************************/
...
@@ -1064,33 +1108,7 @@ static void PATCallback( void *_unused, dvbpsi_pat_t *p_pat )
...
@@ -1064,33 +1108,7 @@ static void PATCallback( void *_unused, dvbpsi_pat_t *p_pat )
if
(
p_old_program
!=
NULL
&&
if
(
p_old_program
!=
NULL
&&
p_old_program
->
i_pid
!=
p_program
->
i_pid
)
p_old_program
->
i_pid
!=
p_program
->
i_pid
)
{
DeleteProgram
(
p_old_program
);
/* Delete old PID */
UnselectPSI
(
p_old_program
->
i_number
,
p_old_program
->
i_pid
);
for
(
i_pmt
=
0
;
i_pmt
<
i_nb_sids
;
i_pmt
++
)
{
if
(
pp_sids
[
i_pmt
]
->
i_sid
==
p_program
->
i_number
)
{
dvbpsi_pmt_t
*
p_old_pmt
=
pp_sids
[
i_pmt
]
->
p_current_pmt
;
if
(
p_old_pmt
!=
NULL
)
{
if
(
i_ca_handle
&&
SIDIsSelected
(
p_old_program
->
i_number
)
&&
PMTNeedsDescrambling
(
p_old_pmt
)
)
en50221_DeletePMT
(
p_old_pmt
);
dvbpsi_DeletePMT
(
p_old_pmt
);
}
pp_sids
[
i_pmt
]
->
p_current_pmt
=
NULL
;
pp_sids
[
i_pmt
]
->
i_sid
=
0
;
pp_sids
[
i_pmt
]
->
i_pmt_pid
=
0
;
dvbpsi_DetachPMT
(
pp_sids
[
i_pmt
]
->
p_dvbpsi_handle
);
break
;
}
}
}
}
}
SelectPSI
(
p_program
->
i_number
,
p_program
->
i_pid
);
SelectPSI
(
p_program
->
i_number
,
p_program
->
i_pid
);
...
@@ -1132,36 +1150,11 @@ static void PATCallback( void *_unused, dvbpsi_pat_t *p_pat )
...
@@ -1132,36 +1150,11 @@ static void PATCallback( void *_unused, dvbpsi_pat_t *p_pat )
if
(
p_program
==
NULL
)
if
(
p_program
==
NULL
)
{
{
int
i_pmt
;
msg_Dbg
(
NULL
,
" * removed number=%d pid=%d"
,
msg_Dbg
(
NULL
,
" * removed number=%d pid=%d"
,
p_old_program
->
i_number
,
p_old_program
->
i_number
,
p_old_program
->
i_pid
);
p_old_program
->
i_pid
);
UnselectPSI
(
p_old_program
->
i_number
,
DeleteProgram
(
p_old_program
);
p_old_program
->
i_pid
);
for
(
i_pmt
=
0
;
i_pmt
<
i_nb_sids
;
i_pmt
++
)
{
if
(
pp_sids
[
i_pmt
]
->
i_sid
==
p_old_program
->
i_number
)
{
dvbpsi_pmt_t
*
p_old_pmt
=
pp_sids
[
i_pmt
]
->
p_current_pmt
;
if
(
p_old_pmt
!=
NULL
)
{
if
(
i_ca_handle
&&
SIDIsSelected
(
p_old_program
->
i_number
)
&&
PMTNeedsDescrambling
(
p_old_pmt
)
)
en50221_DeletePMT
(
p_old_pmt
);
dvbpsi_DeletePMT
(
p_old_pmt
);
}
pp_sids
[
i_pmt
]
->
p_current_pmt
=
NULL
;
pp_sids
[
i_pmt
]
->
i_sid
=
0
;
pp_sids
[
i_pmt
]
->
i_pmt_pid
=
0
;
dvbpsi_DetachPMT
(
pp_sids
[
i_pmt
]
->
p_dvbpsi_handle
);
break
;
}
}
UpdatePAT
(
p_old_program
->
i_number
);
UpdatePAT
(
p_old_program
->
i_number
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment