addedd #ifdefs to uninit

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1667 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-08-23 16:23:11 +00:00
parent 232477eaad
commit 3aed37fb29
1 changed files with 4 additions and 1 deletions

View File

@ -144,14 +144,17 @@ int uninit_video(sh_video_t *sh_video){
if(!sh_video->inited) return;
printf("uninit video: %d \n",sh_video->codec->driver);
switch(sh_video->codec->driver){
#ifdef USE_LIBAVCODEC
case VFM_FFMPEG:
if (avcodec_close(&lavc_context) < 0)
mp_msg(MSGT_DECVIDEO,MSGL_ERR, "could not close codec\n");
break;
#endif
#ifndef USE_DIRECTSHOW
case VFM_DSHOW: // Win32/DirectShow
DS_VideoDecoder_Close();
break;
#endif
case VFM_MPEG:
mpeg2_free_image_buffers (picture);
break;