diff libmpcodecs/dec_video.c @ 7210:09c8c9cca9e4

100l... sh->vcodec may be changed by mpvdec->decode() it caused various crashes, including the mencoder+ijpg one reported by goth
author arpi
date Sat, 31 Aug 2002 21:03:03 +0000
parents 1eadce15446c
children a894e99c1e51
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c	Sat Aug 31 18:59:47 2002 +0000
+++ b/libmpcodecs/dec_video.c	Sat Aug 31 21:03:03 2002 +0000
@@ -207,7 +207,7 @@
 extern int vo_directrendering;
 
 int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){
-vf_instance_t* vf=sh_video->vfilter;
+vf_instance_t* vf;
 mp_image_t *mpi=NULL;
 unsigned int t=GetTimer();
 unsigned int t2;
@@ -236,6 +236,7 @@
 if(!mpi || drop_frame) return 0; // error / skipped frame
 
 //vo_draw_image(video_out,mpi);
+vf=sh_video->vfilter;
 vf->put_image(vf,mpi);
 vf->control(vf,VFCTRL_DRAW_OSD,NULL);