]> git.sesse.net Git - vlc/commitdiff
* modules/packetizer/*: bug fix (use es_format_Copy() when necessary).
authorGildas Bazin <gbazin@videolan.org>
Tue, 13 Apr 2004 10:52:29 +0000 (10:52 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 13 Apr 2004 10:52:29 +0000 (10:52 +0000)
modules/packetizer/copy.c
modules/packetizer/mpeg4video.c

index 87537475d66729919b2e3b0e04626c0607a25ee2..24b8465681cbc34487eee80cdd500567a80b5b2b 100644 (file)
@@ -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 )
index 1e85bdc8ebb022fdfc6cddce936b4077109612ac..a400910d98f66fc29ff06ce872cde37a7ed238d1 100644 (file)
@@ -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 )