some more segfault fixes

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13151 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
faust3 2004-08-26 10:34:20 +00:00
parent 80fa17368d
commit 3f14dd0269
1 changed files with 5 additions and 0 deletions

View File

@ -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: