1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-04 06:01:56 +00:00
mpv/video/decode
wm4 ba921e2617 vd_lavc: fix crashes with old hwaccels
Commit d5702d3b95 messed up the order of destruction of the elements: it
destroyed the avctx before the hwaccel uninit, even though the hwaccel
uninit could access avctx. This could happen with some old hwaccels
only, such as D3D ones before the new libavcodec hwaccel API.

Fix this by making use of the fact that avcodec_flush_buffers() will
uninit the underlying hwaccel. Thus we can be sure avctx is not using
any hwaccel objects anymore, and it's safe to uninit the hwaccel.

Move the hwdec_dev dstruction code with it, because otherwise we would
in theory potentially create some dangling pointers in avctx.
2017-07-10 14:56:48 +02:00
..
d3d.c d3d: UWP support for D3D11VA 2017-06-30 18:57:37 +02:00
d3d.h d3d: UWP support for D3D11VA 2017-06-30 18:57:37 +02:00
dec_video.c vd: use ST.2086 / HDR10 MaxCLL in addition to mastering metadata 2017-06-18 20:54:44 +02:00
dec_video.h dec_video: change license to LGPL (almost) 2017-06-18 18:58:36 +02:00
hw_cuda.c cuda: add new way to set cuda context on cuvid codecs 2017-05-05 00:48:53 +02:00
hw_d3d11va.c d3d: fix behavior with deprecated FFmpeg J pixel formats 2017-07-04 14:06:31 +02:00
hw_dxva2.c d3d: fix behavior with deprecated FFmpeg J pixel formats 2017-07-04 14:06:31 +02:00
hw_videotoolbox.c videotoolbox: support new libavcodec API 2017-05-24 15:25:48 +02:00
lavc.h vd_lavc: remove unused hwaccel support code 2017-07-04 15:01:03 +02:00
vd_lavc.c vd_lavc: fix crashes with old hwaccels 2017-07-10 14:56:48 +02:00
vd.h vd, vd_lavc: change license to LGPL (almost) 2017-06-15 16:32:47 +02:00