0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/video/decode
wm4 cf073138b2 vd_lavc: uninit the hwdec backend after closing the decoder
A recent behavior change in libavcodec's h264 decoder keeps at least 1
surface even after avcodec_flush_buffers() has been called. We used to
flush the decoder in order to make sure all surfaces are free'd, so that
the hw decoder can be safely uninitialized. This doesn't work anymore.

Fix it by closing the AVCodecContext before the hw decoder is
uninitialized. This is actually simpler and more robust. It seems to be
well-supported too.

Fixes invalid read accesses with vaapi-copy and dxva2-copy. These
destroyed the hwdec API fully on uninit, and could not deal with
surfaces surviving the decoder.

Probably fixes #1587.
2015-02-14 16:45:38 +01:00
..
dec_video.c vd_lavc: fix a small memory leak on init error 2014-09-29 20:37:12 +02:00
dec_video.h video: don't keep multiple pointers to hwdec info struct 2014-08-11 23:09:39 +02:00
dxva2.c win32: request UTF-16 API variants, Vista+ APIs, and COM C macros 2015-01-07 21:42:44 +01:00
gpu_memcpy_sse4.h dxva2: gpu_memcpy: fix build for GCC 4.8.3 2014-10-26 13:56:41 +01:00
lavc.h command: add property returning detected hwdec API 2015-02-02 22:43:13 +01:00
vaapi.c video: have a generic context struct for hwdec backends 2015-01-22 15:32:23 +01:00
vd_lavc.c vd_lavc: uninit the hwdec backend after closing the decoder 2015-02-14 16:45:38 +01:00
vd.h video: add a "hwdec" property to enable or disable hw decoding at runtime 2014-04-23 01:58:12 +02:00
vda.c vda: only support the new hwaccel 1.2 API (remove old code) 2014-08-01 10:38:18 +02:00
vdpau.c video: have a generic context struct for hwdec backends 2015-01-22 15:32:23 +01:00