Commit 4efefb82 authored by Gildas Bazin's avatar Gildas Bazin

* modules/packetizer/*: bug fix (use es_format_Copy() when necessary).

parent 8bfe4ed2
......@@ -75,13 +75,7 @@ static int Open( vlc_object_t *p_this )
p_dec->pf_packetize = Packetize;
/* Create the output format */
memcpy( &p_dec->fmt_out, &p_dec->fmt_in, sizeof( es_format_t ) );
if( p_dec->fmt_in.i_extra > 0 )
{
p_dec->fmt_out.p_extra = malloc( p_dec->fmt_in.i_extra );
memcpy( p_dec->fmt_out.p_extra, p_dec->fmt_in.p_extra,
p_dec->fmt_in.i_extra );
}
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
/* Fix the value of the fourcc */
switch( p_dec->fmt_in.i_codec )
......
......@@ -141,7 +141,7 @@ static int Open( vlc_object_t *p_this )
p_sys->b_frame = VLC_FALSE;
/* Setup properties */
p_dec->fmt_out = p_dec->fmt_in;
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
p_dec->fmt_out.i_codec = VLC_FOURCC( 'm', 'p', '4', 'v' );
if( p_dec->fmt_in.i_extra )
......
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