diff options
author | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-08-26 10:34:20 +0000 |
---|---|---|
committer | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-08-26 10:34:20 +0000 |
commit | 3f14dd02690af7ba30a9264f1f7ad70cb21cd5f9 (patch) | |
tree | 80e3f3766d33029c538f798e788d433836be5bf6 /libmpcodecs/vd_libmpeg2.c | |
parent | 80fa17368d35ccdba580812f19758768fc27c0da (diff) | |
download | mpv-3f14dd02690af7ba30a9264f1f7ad70cb21cd5f9.tar.bz2 mpv-3f14dd02690af7ba30a9264f1f7ad70cb21cd5f9.tar.xz |
some more segfault fixes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13151 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_libmpeg2.c')
-rw-r--r-- | libmpcodecs/vd_libmpeg2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c index 26ee36c387..78759cee92 100644 --- a/libmpcodecs/vd_libmpeg2.c +++ b/libmpcodecs/vd_libmpeg2.c @@ -103,6 +103,11 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ 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: |