Mercurial > mplayer.hg
changeset 9745:c79bcf85f68c
10L, close isn't enouth we must munmap too.
author | albeu |
---|---|
date | Sun, 30 Mar 2003 17:05:58 +0000 |
parents | eceac82103f5 |
children | 27fff718ede6 |
files | libmpdemux/tvi_v4l.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/tvi_v4l.c Sun Mar 30 17:02:05 2003 +0000 +++ b/libmpdemux/tvi_v4l.c Sun Mar 30 17:05:58 2003 +0000 @@ -679,7 +679,15 @@ 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);