]> git.sesse.net Git - vlc/commitdiff
transcode.c: reset pointer and size info for extradata when freeing
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Sun, 31 Dec 2006 01:21:08 +0000 (01:21 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Sun, 31 Dec 2006 01:21:08 +0000 (01:21 +0000)
the pointer. Fixes #940

modules/stream_out/transcode.c

index 67656bb1d51962dbda1b9857e64ac33a7589baa0..74c9fc1e0fce9d711d60c638d5788da3ecab0bf6 100644 (file)
@@ -1701,7 +1701,11 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
      * We'll open it only when we have the first frame. */
     module_Unneed( id->p_encoder, id->p_encoder->p_module );
     if( id->p_encoder->fmt_out.p_extra )
+    {
         free( id->p_encoder->fmt_out.p_extra );
+        id->p_encoder->fmt_out.p_extra = NULL;
+        id->p_encoder->fmt_out.i_extra = 0;
+    }
     id->p_encoder->p_module = NULL;
 
     if( p_sys->i_threads >= 1 )