Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
cb233fee
Commit
cb233fee
authored
Jul 22, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: use concat access rather than stream access
parent
dfe06d6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
49 deletions
+55
-49
src/input/input.c
src/input/input.c
+55
-49
No files found.
src/input/input.c
View file @
cb233fee
...
@@ -2231,72 +2231,78 @@ static int InputSourceInit( input_thread_t *p_input,
...
@@ -2231,72 +2231,78 @@ static int InputSourceInit( input_thread_t *p_input,
}
}
else
else
{
/* Now try a real access */
{
/* Now try a real access */
access_t
*
p_access
=
access_New
(
p_input
,
p_input
,
if
(
&
p_input
->
p
->
input
==
in
)
psz_access
,
psz_demux
,
psz_path
);
{
/* On master stream only, use input-list */
if
(
p_access
==
NULL
)
char
*
str
=
var_InheritString
(
p_input
,
"input-list"
);
if
(
str
!=
NULL
)
{
{
msg_Err
(
p_input
,
"open of `%s' failed"
,
psz_mrl
);
char
*
list
;
if
(
!
b_in_can_fail
&&
!
input_Stopped
(
p_input
)
)
dialog_Fatal
(
p_input
,
_
(
"Your input can't be opened"
),
_
(
"VLC is unable to open the MRL '%s'."
" Check the log for details."
),
psz_mrl
);
goto
error
;
}
/* Access-forced demuxer (PARENTAL ADVISORY: EXPLICIT HACK) */
var_Create
(
p_input
,
"concat-list"
,
VLC_VAR_STRING
);
if
(
!
psz_demux
[
0
]
||
!
strcasecmp
(
psz_demux
,
"any"
)
)
if
(
likely
(
asprintf
(
&
list
,
"%s://%s,%s"
,
psz_access
,
psz_path
,
psz_demux
=
p_access
->
psz_demux
;
str
)
>=
0
)
)
/* */
int
i_input_list
;
char
**
ppsz_input_list
;
TAB_INIT
(
i_input_list
,
ppsz_input_list
);
/* On master stream only, use input-list */
if
(
&
p_input
->
p
->
input
==
in
)
{
{
char
*
psz_list
;
var_SetString
(
p_input
,
"concat-list"
,
list
);
char
*
psz_parser
;
free
(
list
);
}
free
(
str
);
psz_access
=
"concat"
;
}
}
psz_list
=
if
(
strcasecmp
(
psz_access
,
"concat"
)
)
psz_parser
=
var_CreateGetNonEmptyString
(
p_input
,
"input-list"
);
{
/* Autodetect extra files if none specified */
int
count
;
char
**
tab
;
while
(
psz_parser
&&
*
psz_parser
)
TAB_INIT
(
count
,
tab
);
InputGetExtraFiles
(
p_input
,
&
count
,
&
tab
,
psz_access
,
psz_path
);
if
(
count
>
0
)
{
{
char
*
p
=
strchr
(
psz_parser
,
','
);
char
*
list
=
NULL
;
if
(
p
)
*
p
++
=
'\0'
;
if
(
*
psz_parser
)
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
{
char
*
psz_name
=
strdup
(
psz_parser
);
char
*
str
;
if
(
psz_name
)
if
(
asprintf
(
&
str
,
"%s,%s"
,
list
?
list
:
psz_mrl
,
TAB_APPEND
(
i_input_list
,
ppsz_input_list
,
psz_name
);
tab
[
i
]
)
<
0
)
break
;
free
(
tab
[
i
]
);
free
(
list
);
list
=
str
;
}
}
psz_parser
=
p
;
var_Create
(
p_input
,
"concat-list"
,
VLC_VAR_STRING
);
if
(
likely
(
list
!=
NULL
)
)
{
var_SetString
(
p_input
,
"concat-list"
,
list
);
free
(
list
);
}
}
free
(
psz_list
)
;
psz_access
=
"concat"
;
}
}
/* Autodetect extra files if none specified */
TAB_CLEAN
(
count
,
tab
);
if
(
i_input_list
<=
0
)
{
InputGetExtraFiles
(
p_input
,
&
i_input_list
,
&
ppsz_input_list
,
psz_access
,
psz_path
);
}
}
if
(
i_input_list
>
0
)
TAB_APPEND
(
i_input_list
,
ppsz_input_list
,
NULL
);
/* Create the stream_t */
/* */
stream_t
*
p_stream
=
stream_AccessNew
(
p_access
,
ppsz_input_list
);
access_t
*
p_access
=
access_New
(
p_input
,
p_input
,
if
(
ppsz_input_list
)
psz_access
,
psz_demux
,
psz_path
);
if
(
p_access
==
NULL
)
{
{
for
(
int
i
=
0
;
ppsz_input_list
[
i
]
!=
NULL
;
i
++
)
msg_Err
(
p_input
,
"open of `%s' failed"
,
psz_mrl
);
free
(
ppsz_input_list
[
i
]
);
if
(
!
b_in_can_fail
&&
!
input_Stopped
(
p_input
)
)
TAB_CLEAN
(
i_input_list
,
ppsz_input_list
);
dialog_Fatal
(
p_input
,
_
(
"Your input can't be opened"
),
_
(
"VLC is unable to open the MRL '%s'."
" Check the log for details."
),
psz_mrl
);
goto
error
;
}
}
/* Access-forced demuxer (PARENTAL ADVISORY: EXPLICIT HACK) */
if
(
!
psz_demux
[
0
]
||
!
strcasecmp
(
psz_demux
,
"any"
)
)
psz_demux
=
p_access
->
psz_demux
;
/* Create the stream_t */
stream_t
*
p_stream
=
stream_AccessNew
(
p_access
,
NULL
);
if
(
p_stream
==
NULL
)
if
(
p_stream
==
NULL
)
{
{
msg_Warn
(
p_input
,
"cannot create a stream_t from access"
);
msg_Warn
(
p_input
,
"cannot create a stream_t from access"
);
...
...
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