10L, close isn't enouth we must munmap too.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9746 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2003-03-30 17:05:58 +00:00
parent 50f296d10a
commit ceb7c49670
1 changed files with 9 additions and 1 deletions

View File

@ -679,7 +679,15 @@ static int uninit(priv_t *priv)
mp_msg(MSGT_TV, MSGL_ERR, "\n MJP: ioctl MJPIOC_QBUF_CAPT failed: %s\n", strerror(errno));
}
}
close(priv->video_fd);
else
{
// We need to munmap as close don't close mem mappings
if(munmap(priv->mmap,priv->mbuf.size))
mp_msg(MSGT_TV, MSGL_ERR, "Munmap failed: %s\n",strerror(errno));
}
if(close(priv->video_fd))
mp_msg(MSGT_TV, MSGL_ERR, "Close tv failed: %s\n",strerror(errno));
audio_in_uninit(&priv->audio_in);