Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
2a310e14
Commit
2a310e14
authored
Dec 03, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: asf: do ES audio selection for mms (fix #8797, #3400, #3797)
parent
836a03aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
8 deletions
+51
-8
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+20
-0
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+31
-8
No files found.
modules/access/mms/mmsh.c
View file @
2a310e14
...
...
@@ -261,6 +261,26 @@ static int Control( access_t *p_access, int i_query, va_list args )
*
pb_bool
=
p_sys
->
asfh
.
stream
[
i_int
].
i_selected
?
true
:
false
;
break
;
case
ACCESS_SET_PRIVATE_ID_STATE
:
i_int
=
(
int
)
va_arg
(
args
,
int
);
b_bool
=
(
bool
)
va_arg
(
args
,
int
);
if
(
(
i_int
<
0
)
||
(
i_int
>
127
)
)
return
VLC_EGENERIC
;
else
{
int
i_cat
=
p_sys
->
asfh
.
stream
[
i_int
].
i_cat
;
for
(
int
i
=
0
;
i
<
128
;
i
++
)
{
/* First unselect all streams from the same cat */
if
(
i_cat
==
p_sys
->
asfh
.
stream
[
i
].
i_cat
)
p_sys
->
asfh
.
stream
[
i
].
i_selected
=
false
;
}
p_sys
->
asfh
.
stream
[
i_int
].
i_selected
=
true
;
Stop
(
p_access
);
Seek
(
p_access
,
p_access
->
info
.
i_pos
);
return
VLC_SUCCESS
;
}
case
ACCESS_SET_PAUSE_STATE
:
b_bool
=
(
bool
)
va_arg
(
args
,
int
);
if
(
b_bool
)
...
...
modules/demux/asf/asf.c
View file @
2a310e14
...
...
@@ -360,6 +360,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
vlc_meta_t
*
p_meta
;
int64_t
i64
,
*
pi64
;
int
i
;
double
f
,
*
pf
;
switch
(
i_query
)
...
...
@@ -394,6 +395,20 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
return
SeekPercent
(
p_demux
,
i_query
,
args
);
case
DEMUX_SET_ES
:
{
i
=
(
int
)
va_arg
(
args
,
int
);
int
i_ret
=
stream_Control
(
p_demux
->
s
,
STREAM_SET_PRIVATE_ID_STATE
,
i
,
true
);
if
(
i_ret
==
VLC_SUCCESS
)
{
SeekPrepare
(
p_demux
);
p_sys
->
i_seek_track
=
0
;
WaitKeyframe
(
p_demux
);
}
return
i_ret
;
}
case
DEMUX_GET_POSITION
:
if
(
p_sys
->
i_time
<
0
)
return
VLC_EGENERIC
;
if
(
p_sys
->
i_length
>
0
)
...
...
@@ -1144,15 +1159,18 @@ static int DemuxInit( demux_t *p_demux )
tk
->
p_esp
=
NULL
;
tk
->
p_frame
=
NULL
;
/* Check (in case of mms) if this track is selected (ie will receive data) */
if
(
!
stream_Control
(
p_demux
->
s
,
STREAM_GET_PRIVATE_ID_STATE
,
(
int
)
p_sp
->
i_stream_number
,
&
b_access_selected
)
&&
!
b_access_selected
)
if
(
strncmp
(
p_demux
->
psz_access
,
"mms"
,
3
)
)
{
tk
->
i_cat
=
UNKNOWN_ES
;
msg_Dbg
(
p_demux
,
"ignoring not selected stream(ID:%u) (by access)"
,
p_sp
->
i_stream_number
);
continue
;
/* Check (not mms) if this track is selected (ie will receive data) */
if
(
!
stream_Control
(
p_demux
->
s
,
STREAM_GET_PRIVATE_ID_STATE
,
(
int
)
p_sp
->
i_stream_number
,
&
b_access_selected
)
&&
!
b_access_selected
)
{
tk
->
i_cat
=
UNKNOWN_ES
;
msg_Dbg
(
p_demux
,
"ignoring not selected stream(ID:%u) (by access)"
,
p_sp
->
i_stream_number
);
continue
;
}
}
/* Find the associated extended_stream_properties if any */
...
...
@@ -1380,6 +1398,11 @@ static int DemuxInit( demux_t *p_demux )
}
fmt
.
i_priority
=
i_priority
;
if
(
i_stream
<=
INT_MAX
)
fmt
.
i_id
=
i_stream
;
else
msg_Warn
(
p_demux
,
"Can't set fmt.i_id to match stream id %u"
,
i_stream
);
tk
->
p_es
=
es_out_Add
(
p_demux
->
out
,
&
fmt
);
}
else
...
...
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