[vlc-commits] mux:ogg: the sout input format is read-only
Steve Lhomme
git at videolan.org
Wed Jul 12 12:23:07 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Jul 10 13:44:50 2017 +0200| [8a8c18322c17c3f8cb2f564935de80d323b8dcca] | committer: Jean-Baptiste Kempf
mux:ogg: the sout input format is read-only
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a8c18322c17c3f8cb2f564935de80d323b8dcca
---
modules/mux/ogg.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index 9135ec338d..26e71ef1cc 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -377,13 +377,15 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
switch( p_input->p_fmt->i_cat )
{
case VIDEO_ES:
+ {
+ unsigned int i_frame_rate = p_input->p_fmt->video.i_frame_rate;
+ unsigned int i_frame_rate_base = p_input->p_fmt->video.i_frame_rate_base;
if( !p_input->p_fmt->video.i_frame_rate ||
!p_input->p_fmt->video.i_frame_rate_base )
{
msg_Warn( p_mux, "Missing frame rate, assuming 25fps" );
- 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;
+ i_frame_rate = 25;
+ i_frame_rate_base = 1;
}
switch( p_stream->i_fourcc )
@@ -421,8 +423,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
}
p_stream->p_oggds_header->i_size = 0 ;
p_stream->p_oggds_header->i_time_unit =
- INT64_C(10000000) * p_input->p_fmt->video.i_frame_rate_base /
- (int64_t)p_input->p_fmt->video.i_frame_rate;
+ INT64_C(10000000) * i_frame_rate_base /
+ (int64_t)i_frame_rate;
p_stream->p_oggds_header->i_samples_per_unit = 1;
p_stream->p_oggds_header->i_default_len = 1 ; /* ??? */
p_stream->p_oggds_header->i_buffer_size = 1024*1024;
@@ -452,6 +454,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
FREENULL( p_input->p_sys );
return VLC_EGENERIC;
}
+ }
break;
case AUDIO_ES:
More information about the vlc-commits
mailing list