vlc | branch: master | Steve Lhomme <[email protected]> | Mon Sep 2 09:58:25 2019 +0200| [e7c103edd934e6b5caa503657d77d27af184cd8b] | committer: Steve Lhomme
dxva2: avoid redundant storage with the lavc structure > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7c103edd934e6b5caa503657d77d27af184cd8b --- modules/codec/avcodec/dxva2.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c index f2136f71fc..44a12ad10a 100644 --- a/modules/codec/avcodec/dxva2.c +++ b/modules/codec/avcodec/dxva2.c @@ -126,7 +126,6 @@ struct vlc_va_sys_t DXVA2_ConfigPictureDecode cfg; GUID decoder_guid; IDirectXVideoDecoderService *d3ddec; - IDirectXVideoDecoder *dxdecoder; /* pool */ IDirect3DSurface9 *hw_surface[MAX_SURFACE_COUNT]; @@ -149,7 +148,6 @@ static void DxDestroyVideoDecoder(vlc_va_sys_t *); static void SetupAVCodecContext(vlc_va_sys_t *sys, unsigned surfaces) { - sys->hw.decoder = sys->dxdecoder; sys->hw.cfg = &sys->cfg; sys->hw.surface_count = surfaces; sys->hw.surface = sys->hw_surface; @@ -198,7 +196,7 @@ static struct va_pic_context *CreatePicContext(IDirect3DSurface9 *surface, IDire static struct va_pic_context* NewSurfacePicContext(vlc_va_t *va, int surface_index) { vlc_va_sys_t *sys = va->sys; - struct va_pic_context *pic_ctx = CreatePicContext(sys->hw_surface[surface_index], sys->dxdecoder); + struct va_pic_context *pic_ctx = CreatePicContext(sys->hw_surface[surface_index], sys->hw.decoder); if (unlikely(pic_ctx==NULL)) return NULL; /* all the resources are acquired during surfaces init, and a second time in @@ -657,8 +655,8 @@ static void DxDestroyVideoDecoder(vlc_va_sys_t *sys) { directx_sys_t *dx_sys = &sys->dx_sys; /* releases a reference on each decoder surface */ - if (sys->dxdecoder) - IDirectXVideoDecoder_Release(sys->dxdecoder); + if (sys->hw.decoder) + IDirectXVideoDecoder_Release(sys->hw.decoder); for (unsigned i = 0; i < dx_sys->va_pool.surface_count; i++) IDirect3DSurface9_Release(sys->hw_surface[i]); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
