Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dxva: fix RelBuffer, use correct CDecoder object #5361

Merged
merged 2 commits into from Sep 13, 2014

Conversation

FernetMenta
Copy link
Contributor

in GetFormat we create a new CDecoder object but some buffers requested with GetBuffer belong to the old CDecoder object. we need to make sure that RelBuffer returns the buffer to the correct object.

@ace20022 can you test this please. the problem was that RelBuffer was called on the new CDecoder object which closed itself because the refcount was 0.

@ace20022
Copy link
Member

@FernetMenta I'm afraid this one does not help.
How about (just guessing):

diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
index e76a6ce..09968f3 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
@@ -512,6 +512,7 @@ bool CDXVAContext::CreateDecoder(GUID &inGuid, DXVA2_VideoDesc *format, const DX
   {
     (*it)->CloseDXVADecoder();
   }
+  m_decoders.clear();

   HRESULT res = m_service->CreateVideoDecoder(inGuid, format, config, surfaces, count, decoder);
   if (FAILED(res))

@FernetMenta
Copy link
Contributor Author

nope, that's not what we want to do. if we did this next call to CreateDecoder would not release hw decoder. how can I reproduce your issue? do you have a sample and instructions?

@ace20022
Copy link
Member

It's a bit tricky, can you join the chat?

@FernetMenta
Copy link
Contributor Author

not now, boarding in 5 min ... maybe this evening. can you post a full debug log?

@ace20022
Copy link
Member

Will post one in the team's dev section.

@FernetMenta
Copy link
Contributor Author

@ace20022 I added another patch here. could you test this please?

@ace20022
Copy link
Member

Yes, that one fixes the issue!

@ace20022
Copy link
Member

jenkins build this please

ace20022 added a commit that referenced this pull request Sep 13, 2014
dxva: fix RelBuffer, use correct CDecoder object
@ace20022 ace20022 merged commit 4cbf9e0 into xbmc:master Sep 13, 2014
@MartijnKaijser MartijnKaijser added this to the Helix 14.0-alpha4 milestone Sep 14, 2014
@ace20022
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants