diff libmpcodecs/vd_libmpeg2.c @ 13150:a7542243d695

some more segfault fixes
author faust3
date Thu, 26 Aug 2004 10:34:20 +0000
parents 653df8deffc7
children e264e6d6eb76
line wrap: on
line diff
--- a/libmpcodecs/vd_libmpeg2.c	Thu Aug 26 10:12:14 2004 +0000
+++ b/libmpcodecs/vd_libmpeg2.c	Thu Aug 26 10:34:20 2004 +0000
@@ -103,6 +103,11 @@
     mp_image_t* mpi=NULL;
     int drop_frame, framedrop=flags&3;
 
+    //MPlayer registers its own draw_slice callback, prevent libmpeg2 from freeing the context
+    mpeg2dec->decoder.convert=NULL;
+    mpeg2dec->decoder.convert_id=NULL;
+   
+    
     if(len<=0) return NULL; // skipped null frame
     
     // append extra 'end of frame' code: