Skip to content

Commit

Permalink
DO NOT MERGE: kill buffer texture
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Mar 15, 2024
1 parent 3c10a1b commit 9f596d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libavfilter/vsrc_ddagrab.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ static int next_frame_internal(AVFilterContext *avctx, ID3D11Texture2D **desktop
// The API might even return it in with a format that was not in the initial
// list of supported formats, and it can change/flicker randomly.
// To work around this, return an internal copy of the last valid texture we got.
release_resource(&desktop_resource);
//release_resource(&desktop_resource);

// The initial probing should make this impossible.
if (!dda->buffer_texture) {
Expand All @@ -729,9 +729,9 @@ static int next_frame_internal(AVFilterContext *avctx, ID3D11Texture2D **desktop
}

av_log(avctx, AV_LOG_TRACE, "Returning internal buffer for a frame!\n");
ID3D11Texture2D_AddRef(dda->buffer_texture);
*desktop_texture = dda->buffer_texture;
return 0;
//ID3D11Texture2D_AddRef(dda->buffer_texture);
//*desktop_texture = dda->buffer_texture;
//return 0;
}

hr = IDXGIResource_QueryInterface(desktop_resource, &IID_ID3D11Texture2D, (void**)desktop_texture);
Expand Down

0 comments on commit 9f596d3

Please sign in to comment.