]> git.sesse.net Git - vlc/commitdiff
rtp sout: adjust scope of variable
authorPierre Ynard <linkfanel@yahoo.fr>
Tue, 29 Dec 2009 17:03:04 +0000 (18:03 +0100)
committerPierre Ynard <linkfanel@yahoo.fr>
Tue, 29 Dec 2009 17:03:04 +0000 (18:03 +0100)
modules/stream_out/rtp.c

index ace40571e4f3c5420943203bb24af57ddcb7f006..7de60c7564c5d0182fd97507da37b37db1c9d2d9 100644 (file)
@@ -1237,12 +1237,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
         case VLC_CODEC_MP4V:
         {
-            char hexa[2*p_fmt->i_extra +1];
-
             id->psz_enc = "MP4V-ES";
             id->pf_packetize = rtp_packetize_split;
             if( p_fmt->i_extra > 0 )
             {
+                char hexa[2*p_fmt->i_extra +1];
                 sprintf_hexa( hexa, p_fmt->p_extra, p_fmt->i_extra );
                 if( asprintf( &id->psz_fmtp,
                               "profile-level-id=3; config=%s;", hexa ) == -1 )