[vlc-commits] demux: mp4: fix smooth extradata size

Francois Cartegnie git at videolan.org
Thu Jun 11 16:52:20 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jun 11 16:49:16 2015 +0200| [207c1d2a79ffd2d6da73a2bfc5d08b114d85a45c] | committer: Francois Cartegnie

demux: mp4: fix smooth extradata size

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=207c1d2a79ffd2d6da73a2bfc5d08b114d85a45c
---

 modules/demux/mp4/mp4.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 180a5e1..b50beca 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3438,10 +3438,10 @@ static int build_raw_avcC( uint8_t **p_extra, const uint8_t *CodecPrivateData,
 
 static inline int MP4_SetCodecExtraData( es_format_t *fmt, MP4_Box_data_stra_t *p_data )
 {
-    fmt->i_extra = p_data->cpd_len;
     fmt->p_extra = malloc( p_data->cpd_len );
     if( unlikely( !fmt->p_extra ) )
         return VLC_ENOMEM;
+    fmt->i_extra = p_data->cpd_len;
     memcpy( fmt->p_extra, p_data->CodecPrivateData, p_data->cpd_len );
     return VLC_SUCCESS;
   }



More information about the vlc-commits mailing list