changeset 13150:a7542243d695

some more segfault fixes
author faust3
date Thu, 26 Aug 2004 10:34:20 +0000
parents 9e90b90a8d7c
children a46a7abbd01f
files libmpcodecs/vd_libmpeg2.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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: