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
3cb4988a
Commit
3cb4988a
authored
Apr 05, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvb: demux: generate uri
parent
1fd78fc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+28
-1
No files found.
modules/demux/playlist/dvb.c
View file @
3cb4988a
...
@@ -109,6 +109,8 @@ static int Demux( demux_t *p_demux )
...
@@ -109,6 +109,8 @@ static int Demux( demux_t *p_demux )
char
**
ppsz_options
=
NULL
;
char
**
ppsz_options
=
NULL
;
int
i_options
=
0
;
int
i_options
=
0
;
char
*
psz_name
=
NULL
;
char
*
psz_name
=
NULL
;
char
*
psz_uri
=
strdup
(
"dvb://"
);
int
i_optionslen
=
0
;
if
(
!
ParseLine
(
psz_line
,
&
psz_name
,
&
ppsz_options
,
&
i_options
)
)
if
(
!
ParseLine
(
psz_line
,
&
psz_name
,
&
ppsz_options
,
&
i_options
)
)
{
{
...
@@ -118,9 +120,33 @@ static int Demux( demux_t *p_demux )
...
@@ -118,9 +120,33 @@ static int Demux( demux_t *p_demux )
EnsureUTF8
(
psz_name
);
EnsureUTF8
(
psz_name
);
for
(
int
i
=
0
;
i
<
i_options
;
i
++
)
for
(
int
i
=
0
;
i
<
i_options
;
i
++
)
{
EnsureUTF8
(
ppsz_options
[
i
]
);
EnsureUTF8
(
ppsz_options
[
i
]
);
i_optionslen
+=
(
strlen
(
ppsz_options
[
i
]
)
+
2
);
}
if
(
i_optionslen
)
{
/* ensure uri is also generated dvb:// :op1 :op2 */
char
*
psz_localuri
=
calloc
(
i_optionslen
+
6
+
1
,
sizeof
(
char
)
);
if
(
psz_localuri
)
{
char
*
psz_tmp
;
char
*
psz_forward
;
psz_forward
=
strcat
(
psz_localuri
,
psz_uri
)
+
6
;
for
(
int
i
=
0
;
i
<
i_options
;
i
++
)
{
psz_tmp
=
ppsz_options
[
i
];
/* avoid doing i*strcat */
*
psz_forward
++
=
' '
;
*
psz_forward
++
=
':'
;
while
(
*
psz_tmp
)
*
psz_forward
++
=
*
psz_tmp
++
;
}
free
(
psz_uri
);
psz_uri
=
psz_localuri
;
}
}
p_input
=
input_item_NewExt
(
p_demux
,
"dvb://"
,
psz_name
,
p_input
=
input_item_NewExt
(
p_demux
,
psz_uri
,
psz_name
,
i_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
i_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
vlc_gc_decref
(
p_input
);
...
@@ -129,6 +155,7 @@ static int Demux( demux_t *p_demux )
...
@@ -129,6 +155,7 @@ static int Demux( demux_t *p_demux )
free
(
ppsz_options
[
i_options
]
);
free
(
ppsz_options
[
i_options
]
);
free
(
ppsz_options
);
free
(
ppsz_options
);
free
(
psz_uri
);
free
(
psz_line
);
free
(
psz_line
);
}
}
...
...
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