Skip to content
Browse files

vdpau: fix segfault

  • Loading branch information...
1 parent cb2dbf7 commit 828d616438ad022be38837731c9a3cc2150fce86 @FernetMenta committed
Showing with 4 additions and 6 deletions.
  1. +4 −6 xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
View
10 xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
@@ -1111,6 +1111,7 @@ bool CDecoder::CheckStatus(VdpStatus vdp_st, int line)
CVdpauRenderPicture* CVdpauRenderPicture::Acquire()
{
CSingleLock lock(*renderPicSection);
+
if (refCount == 0)
vdpau->Acquire();
@@ -1127,12 +1128,9 @@ long CVdpauRenderPicture::Release()
return refCount;
lock.Leave();
- if (vdpau)
- {
- vdpau->ReturnRenderPicture(this);
- vdpau->ReleasePicReference();
- vdpau = NULL;
- }
+ vdpau->ReturnRenderPicture(this);
+ vdpau->ReleasePicReference();
+
return refCount;
}

0 comments on commit 828d616

Please sign in to comment.
Something went wrong with that request. Please try again.