Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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
vlc-gpu
Commits
e4beeb2e
Commit
e4beeb2e
authored
Apr 27, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/input/es_out.c: cleanup empty programs.
parent
53444459
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
10 deletions
+50
-10
src/input/es_out.c
src/input/es_out.c
+50
-10
No files found.
src/input/es_out.c
View file @
e4beeb2e
...
...
@@ -496,6 +496,50 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
return
p_pgrm
;
}
/* EsOutDelProgram:
* Delete a program
*/
static
void
EsOutProgramDel
(
es_out_t
*
out
,
int
i_group
)
{
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
es_out_pgrm_t
*
p_pgrm
=
NULL
;
vlc_value_t
val
;
int
i
;
for
(
i
=
0
;
i
<
p_sys
->
i_pgrm
;
i
++
)
{
if
(
p_sys
->
pgrm
[
i
]
->
i_id
==
i_group
)
{
p_pgrm
=
p_sys
->
pgrm
[
i
];
break
;
}
}
if
(
p_pgrm
==
NULL
)
return
;
if
(
p_pgrm
->
i_es
)
{
msg_Dbg
(
p_input
,
"can't delete program %d which still has %i ES"
,
i_group
,
p_pgrm
->
i_es
);
return
;
}
TAB_REMOVE
(
p_sys
->
i_pgrm
,
p_sys
->
pgrm
,
p_pgrm
);
/* If program is selected we need to unselect it */
if
(
p_sys
->
p_pgrm
==
p_pgrm
)
p_sys
->
p_pgrm
=
0
;
if
(
p_pgrm
->
psz_now_playing
)
free
(
p_pgrm
->
psz_now_playing
);
free
(
p_pgrm
);
/* Update "program" variable */
val
.
i_int
=
i_group
;
var_Change
(
p_input
,
"program"
,
VLC_VAR_DELCHOICE
,
&
val
,
NULL
);
var_SetBool
(
p_sys
->
p_input
,
"intf-change"
,
VLC_TRUE
);
}
/* EsOutProgramMeta:
*/
static
void
EsOutProgramMeta
(
es_out_t
*
out
,
int
i_group
,
vlc_meta_t
*
p_meta
)
...
...
@@ -1011,11 +1055,7 @@ static void EsOutDel( es_out_t *out, es_out_id_t *es )
TAB_REMOVE
(
p_sys
->
i_es
,
p_sys
->
es
,
es
);
es
->
p_pgrm
->
i_es
--
;
if
(
es
->
p_pgrm
->
i_es
==
0
)
{
msg_Warn
(
p_sys
->
p_input
,
"Program doesn't contain anymore ES, "
"TODO cleaning ?"
);
}
if
(
es
->
p_pgrm
->
i_es
==
0
)
EsOutProgramDel
(
out
,
es
->
p_pgrm
->
i_id
);
if
(
p_sys
->
p_es_audio
==
es
)
p_sys
->
p_es_audio
=
NULL
;
if
(
p_sys
->
p_es_video
==
es
)
p_sys
->
p_es_video
=
NULL
;
...
...
@@ -1503,11 +1543,11 @@ static void EsOutAddInfo( es_out_t *out, es_out_id_t *es )
fmt
->
video
.
i_visible_width
,
fmt
->
video
.
i_visible_height
);
if
(
fmt
->
video
.
i_frame_rate
>
0
&&
fmt
->
video
.
i_frame_rate_base
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Frame rate"
),
"%f"
,
(
float
)
fmt
->
video
.
i_frame_rate
/
fmt
->
video
.
i_frame_rate_base
);
fmt
->
video
.
i_frame_rate_base
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Frame rate"
),
"%f"
,
(
float
)
fmt
->
video
.
i_frame_rate
/
fmt
->
video
.
i_frame_rate_base
);
break
;
case
SPU_ES
:
...
...
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