Commit b87e9801 authored by Gildas Bazin's avatar Gildas Bazin

* modules/mux/mpeg/ts.c: proper muxing of ISO/IEC 14496-2 (aka mpeg 4 video)...

* modules/mux/mpeg/ts.c: proper muxing of ISO/IEC 14496-2 (aka mpeg 4 video) as specified in ISO/IEC 13818-1
parent 916eeea2
...@@ -636,8 +636,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -636,8 +636,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
break; break;
case VLC_FOURCC( 'm', 'p','4', 'v' ): case VLC_FOURCC( 'm', 'p','4', 'v' ):
p_stream->i_stream_type = 0x10; p_stream->i_stream_type = 0x10;
p_stream->i_stream_id = 0xfa; p_stream->i_stream_id = 0xe0;
p_sys->i_mpeg4_streams++;
p_stream->i_es_id = p_stream->i_pid; p_stream->i_es_id = p_stream->i_pid;
break; break;
case VLC_FOURCC( 'h', '2','6', '4' ): case VLC_FOURCC( 'h', '2','6', '4' ):
...@@ -689,7 +688,6 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -689,7 +688,6 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_stream->i_stream_type = 0x06; p_stream->i_stream_type = 0x06;
p_stream->i_stream_id = 0xbd; p_stream->i_stream_id = 0xbd;
break; break;
case VLC_FOURCC( 'm', 'p','4', 'a' ): case VLC_FOURCC( 'm', 'p','4', 'a' ):
p_stream->i_stream_type = 0x11; p_stream->i_stream_type = 0x11;
p_stream->i_stream_id = 0xfa; p_stream->i_stream_id = 0xfa;
...@@ -1182,6 +1180,20 @@ static int Mux( sout_mux_t *p_mux ) ...@@ -1182,6 +1180,20 @@ static int Mux( sout_mux_t *p_mux )
* so don't remove it ... */ * so don't remove it ... */
p_data->i_pts = p_data->i_dts; 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, E_( EStoPES )( p_mux->p_sout, &p_data, p_data,
p_input->p_fmt, p_stream->i_stream_id, p_input->p_fmt, p_stream->i_stream_id,
1, b_data_alignment, i_header_size, 0 ); 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