[vlc-commits] avcodec: vdpau: use the VdpDevice from the decoder device
Steve Lhomme
git at videolan.org
Wed Nov 27 10:18:35 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Nov 22 12:53:00 2019 +0100| [f736b0cba013eb10458f6d8fd77f0f92021e9c3f] | committer: Steve Lhomme
avcodec: vdpau: use the VdpDevice from the decoder device
Instead of holding a reference.
The decoder device won't change during the lieftime of the decoder.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f736b0cba013eb10458f6d8fd77f0f92021e9c3f
---
modules/hw/vdpau/avcodec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index b621579377..0d3bf907b2 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -149,7 +149,6 @@ static void DestroyVDPAUVideoContext(void *private)
struct video_context_private *vctx_priv = private;
for (unsigned i = 0; vctx_priv->pool[i] != NULL; i++)
vlc_vdp_video_destroy(vctx_priv->pool[i]);
- vdp_release_x11(vctx_priv->vdp);
}
const struct vlc_video_context_operations vdpau_vctx_ops = {
@@ -230,7 +229,7 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const AVPixFmtDescriptor *d
sys->hwaccel_context = NULL;
vdpau_decoder_device_t *vdpau_decoder = GetVDPAUOpaqueDevice(dec_device);
vctx_priv->vdp = vdpau_decoder->vdp;
- vdp_hold_x11(vctx_priv->vdp, &sys->device);
+ sys->device = vdpau_decoder->device;
unsigned flags = AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH;
More information about the vlc-commits
mailing list