[mythtv-commits] Ticket #11652: Fix DXVA segfault upon playback exit
MythTV
noreply at mythtv.org
Sun Sep 1 12:20:41 UTC 2013
#11652: Fix DXVA segfault upon playback exit
-------------------------------------+----------------------------
Reporter: SHinck@… | Owner: stuartm
Type: Patch - Bug Fix | Status: infoneeded
Priority: minor | Milestone: 0.27
Component: MythTV - Video Playback | Version: 0.26-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-------------------------------------+----------------------------
Comment (by Sascha Hinck <SHinck@…>):
In [changeset:"d441bdf5a083e27e7def6a7c0ac205e071e63c45/mythtv"]:
{{{
#!CommitTicketReference repository="mythtv"
revision="d441bdf5a083e27e7def6a7c0ac205e071e63c45"
Fix Memory Leak in DVXA
According to Microsoft MSDN The CreateSurface? method also adds reference
counts to the surface buffers:
"The method fills the array with IDirect3DSurface9 pointers. The caller
must release all of the interface pointers. In addition, the front buffer
holds a reference count on each of the back buffers. Therefore, the back
buffers are never deleted until the front buffer is deleted."
So I eliminated the additional add of reference counts to all the buffers
because this would lead to a Memory leak because our code releases this
buffers only once.
Additionally I designed the release of this buffers as SafeRelease? which
is recommended by Microsoft:
{{{
Checks whether the pointer is NULL.
Calls Release if the pointer is not NULL.
Sets the pointer to NULL.
}}}
Refs #11652
Signed-off-by: Stuart Morgan <smorgan at mythtv.org>
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11652#comment:5>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list