[MPlayer-dev-eng] [PATCH] fix to vdpau

Dan Oscarsson Dan.Oscarsson at tieto.com
Tue Aug 3 10:09:28 CEST 2010


sön 2010-08-01 klockan 19:45 +0200 skrev Reimar Döffinger:
> On Sun, Aug 01, 2010 at 07:29:42PM +0200, Dan Oscarsson wrote:
> > Attached is a small fix to vo_vdpau.c as otherwise it will set deint_mpi
> > to NULL outside its size. This has existed for a long time so it does
> > not crash mplayer normally.
> > 
> >    Dan
> 
> > --- libvo/vo_vdpau.c.org	2010-08-01 19:16:33.253938365 +0200
> > +++ libvo/vo_vdpau.c	2010-08-01 19:20:41.941938475 +0200
> > @@ -608,9 +608,10 @@
> >          surface_render[i].surface = VDP_INVALID_HANDLE;
> >      for (i = 0; i < 3; i++) {
> >          deint_surfaces[i] = VDP_INVALID_HANDLE;
> > -        if (i < 2 && deint_mpi[i])
> > +        if (i < 2 && deint_mpi[i]) {
> >              deint_mpi[i]->usage_count--;
> > -        deint_mpi[i] = NULL;
> > +            deint_mpi[i] = NULL;
> > +        }
> >      }
> 
> This code is duplicated from free_video_specific which does it right.
> Even if you don't want to merge them, at least copy it 1:1.

I guess the original coder wanted to merge the two loops.
The attached patch follows the code in free_video_specific.

    Dan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-vdpau.diff
Type: text/x-patch
Size: 734 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100803/75ace354/attachment-0001.bin>


More information about the MPlayer-dev-eng mailing list