Commit 4d7aae0e authored by gbazin's avatar gbazin
Browse files

* modules/mux/mpeg/*: add the mpeg4 video VOL data inside EStoPES so it can be...

* modules/mux/mpeg/*: add the mpeg4 video VOL data inside EStoPES so it can be used by the PS muxer as well.
parent dacfc1a7
......@@ -255,6 +255,15 @@ int E_( EStoPES )( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es,
i_stream_id = PES_PRIVATE_STREAM_1;
}
if( p_fmt->i_codec == VLC_FOURCC( 'm', 'p','4', 'v' ) &&
p_es->i_flags & BLOCK_FLAG_TYPE_I )
{
/* For MPEG4 video, add VOL before I-frames */
p_es = block_Realloc( p_es, p_fmt->i_extra, p_es->i_buffer );
memcpy( p_es->p_buffer, p_fmt->p_extra, p_fmt->i_extra );
}
i_pts = p_es->i_pts <= 0 ? 0 : p_es->i_pts * 9 / 100; // 90000 units clock
i_dts = p_es->i_dts <= 0 ? 0 : p_es->i_dts * 9 / 100; // 90000 units clock
......
......@@ -1181,19 +1181,6 @@ static int Mux( sout_mux_t *p_mux )
p_data->i_pts = p_data->i_dts;
}
if( p_input->p_fmt->i_codec ==
VLC_FOURCC( 'm', 'p','4', 'v' ) &&
p_data->i_flags & BLOCK_FLAG_TYPE_I )
{
/* For MPEG4 video, add VOL before I-frames */
p_data = block_Realloc( p_data,
p_input->p_fmt->i_extra,
p_data->i_buffer );
memcpy( p_data->p_buffer, p_input->p_fmt->p_extra,
p_input->p_fmt->i_extra );
}
E_( EStoPES )( p_mux->p_sout, &p_data, p_data,
p_input->p_fmt, p_stream->i_stream_id,
1, b_data_alignment, i_header_size, 0 );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment