[Mplayer-cvslog] CVS: main/libmpdemux tvi_v4l.c,1.61,1.62

Alban Bedel albeu at free.fr
Sun Mar 30 22:32:50 CEST 2003


Hi D Richard Felker III,

on Sun, 30 Mar 2003 15:02:46 -0500 you wrote:

> On Sun, Mar 30, 2003 at 07:06:05PM +0200, Alban Bedel CVS wrote:
> > Update of /cvsroot/mplayer/main/libmpdemux
> > In directory mail:/var/tmp.root/cvs-serv4377/libmpdemux
> > 
> > Modified Files:
> > 	tvi_v4l.c 
> > Log Message:
> > 10L, close isn't enouth we must munmap too.
> > 
> > 
> > Index: tvi_v4l.c
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_v4l.c,v
> > retrieving revision 1.61
> > retrieving revision 1.62
> > diff -u -r1.61 -r1.62
> > --- tvi_v4l.c	23 Mar 2003 15:05:14 -0000	1.61
> > +++ tvi_v4l.c	30 Mar 2003 17:05:58 -0000	1.62
> > @@ -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));
> 
> AFAIK, the only error close can return is "bad fd" (i.e. you passed it
> a number that's not a fd), so checking for error is probably
> pointless.
It's the rest of my search to this bug. Fell free to revert if you think
it can hurt ;)
	Albeu



More information about the MPlayer-cvslog mailing list