Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
862771a8
Commit
862771a8
authored
Feb 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mux: constify stream format
parent
49364d3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
include/vlc_sout.h
include/vlc_sout.h
+5
-5
modules/mux/ogg.c
modules/mux/ogg.c
+3
-2
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+7
-2
No files found.
include/vlc_sout.h
View file @
862771a8
...
...
@@ -146,15 +146,15 @@ enum sout_mux_query_e
struct
sout_input_t
{
es_format_t
*
p_fmt
;
block_fifo_t
*
p_fifo
;
void
*
p_sys
;
const
es_format_t
*
p_fmt
;
block_fifo_t
*
p_fifo
;
void
*
p_sys
;
es_format_t
fmt
;
};
VLC_API
sout_mux_t
*
sout_MuxNew
(
sout_instance_t
*
,
const
char
*
,
sout_access_out_t
*
)
VLC_USED
;
VLC_API
sout_input_t
*
sout_MuxAddStream
(
sout_mux_t
*
,
es_format_t
*
)
VLC_USED
;
VLC_API
sout_input_t
*
sout_MuxAddStream
(
sout_mux_t
*
,
const
es_format_t
*
)
VLC_USED
;
VLC_API
void
sout_MuxDeleteStream
(
sout_mux_t
*
,
sout_input_t
*
);
VLC_API
void
sout_MuxDelete
(
sout_mux_t
*
);
VLC_API
int
sout_MuxSendBuffer
(
sout_mux_t
*
,
sout_input_t
*
,
block_t
*
);
...
...
modules/mux/ogg.c
View file @
862771a8
...
...
@@ -381,8 +381,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
!
p_input
->
p_fmt
->
video
.
i_frame_rate_base
)
{
msg_Warn
(
p_mux
,
"Missing frame rate, assuming 25fps"
);
p_input
->
p_fmt
->
video
.
i_frame_rate
=
25
;
p_input
->
p_fmt
->
video
.
i_frame_rate_base
=
1
;
assert
(
p_input
->
p_fmt
==
&
p_input
->
fmt
);
p_input
->
fmt
.
video
.
i_frame_rate
=
25
;
p_input
->
fmt
.
video
.
i_frame_rate_base
=
1
;
}
switch
(
p_stream
->
i_fourcc
)
...
...
src/stream_output/stream_output.c
View file @
862771a8
...
...
@@ -433,7 +433,7 @@ void sout_MuxDelete( sout_mux_t *p_mux )
/*****************************************************************************
* sout_MuxAddStream:
*****************************************************************************/
sout_input_t
*
sout_MuxAddStream
(
sout_mux_t
*
p_mux
,
es_format_t
*
p_fmt
)
sout_input_t
*
sout_MuxAddStream
(
sout_mux_t
*
p_mux
,
const
es_format_t
*
p_fmt
)
{
sout_input_t
*
p_input
;
...
...
@@ -450,7 +450,11 @@ sout_input_t *sout_MuxAddStream( sout_mux_t *p_mux, es_format_t *p_fmt )
p_input
=
malloc
(
sizeof
(
sout_input_t
)
);
if
(
!
p_input
)
return
NULL
;
p_input
->
p_fmt
=
p_fmt
;
// FIXME: remove either fmt or p_fmt...
es_format_Copy
(
&
p_input
->
fmt
,
p_fmt
);
p_input
->
p_fmt
=
&
p_input
->
fmt
;
p_input
->
p_fifo
=
block_FifoNew
();
p_input
->
p_sys
=
NULL
;
...
...
@@ -500,6 +504,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
}
block_FifoRelease
(
p_input
->
p_fifo
);
es_format_Clean
(
&
p_input
->
fmt
);
free
(
p_input
);
}
}
...
...
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