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
1d6c495f
Commit
1d6c495f
authored
Sep 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error handling
parent
feadfb1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
modules/mux/mpjpeg.c
modules/mux/mpjpeg.c
+23
-10
No files found.
modules/mux/mpjpeg.c
View file @
1d6c495f
...
@@ -79,26 +79,39 @@ struct sout_mux_sys_t
...
@@ -79,26 +79,39 @@ struct sout_mux_sys_t
*****************************************************************************/
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
)
{
{
int
i_size
;
sout_mux_t
*
p_mux
=
(
sout_mux_t
*
)
p_this
;
sout_mux_t
*
p_mux
=
(
sout_mux_t
*
)
p_this
;
sout_mux_sys_t
*
p_sys
;
sout_mux_sys_t
*
p_sys
;
char
*
psz_separator_block
,
*
psz_separator
;
char
*
psz_separator_block
,
*
psz_separator
;
msg_Dbg
(
p_mux
,
"Multipart jpeg muxer opened"
);
msg_Dbg
(
p_mux
,
"Multipart jpeg muxer opened"
);
config_ChainParse
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
psz_separator
=
var_GetNonEmptyString
(
p_mux
,
SOUT_CFG_PREFIX
"separator"
);
if
(
psz_separator
==
NULL
)
{
msg_Err
(
p_this
,
"missing required multipart separator"
);
return
VLC_EGENERIC
;
}
config_ChainParse
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
p_sys
=
p_mux
->
p_sys
=
malloc
(
sizeof
(
sout_mux_sys_t
)
);
p_sys
=
p_mux
->
p_sys
=
malloc
(
sizeof
(
sout_mux_sys_t
)
);
if
(
p_sys
==
NULL
)
return
VLC_ENOMEM
;
p_sys
->
b_send_headers
=
VLC_TRUE
;
p_sys
->
b_send_headers
=
VLC_TRUE
;
psz_separator
=
var_GetString
(
p_mux
,
SOUT_CFG_PREFIX
"separator"
);
if
(
asprintf
(
&
psz_separator_block
,
"
\r\n
%s
\r\n
%s
\r\n
"
,
psz_separator
,
i_size
=
strlen
(
psz_separator
)
+
2
+
2
+
2
+
strlen
(
CONTENT_TYPE
);
CONTENT_TYPE
)
==
-
1
)
psz_separator_block
=
(
char
*
)
malloc
(
i_size
);
psz_separator_block
=
NULL
;
sprintf
(
psz_separator_block
,
"
\r\n
%s
\r\n
%s
\r\n
"
,
psz_separator
,
free
(
psz_separator_block
);
CONTENT_TYPE
);
p_sys
->
p_separator
=
block_New
(
p_mux
,
i_size
);
if
(
psz_separator_block
==
NULL
)
memcpy
(
p_sys
->
p_separator
->
p_buffer
,
psz_separator_block
,
i_size
);
{
free
(
p_sys
);
return
VLC_ENOMEM
;
}
if
(
psz_separator_block
)
free
(
psz_separator_block
);
p_sys
->
p_separator
=
block_New
(
p_mux
,
strlen
(
psz_separator_block
)
);
strcpy
(
(
char
*
)
p_sys
->
p_separator
->
p_buffer
,
psz_separator_block
);
p_mux
->
pf_control
=
Control
;
p_mux
->
pf_control
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_addstream
=
AddStream
;
...
...
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