mpv/video/out
Sven Kroeger fc8c1fcfb2 drm_prime: double free bug
This commit fixes a bug where handle for a framebuffer gets double
freed.
It seems to happen that the same prime fd gets two framebuffers.
As the prime fd is the same the resulting prime handle is also the
same.
This means one handle but 2 framebuffers and can lead to the following
chain:

1. The first framebuffer gets deleted the handle gets also freed via
the ioctl.

2. In startup phase not all 4 dumb buffers for overlay drawing
are set up. It can happen that the last dumb buffer gets the
handle we freed above.

3. The second framebuffer gets freed and the handle will be
freed again resulting that the 4's dumb buffer handle is not
backed by a buffer.

4. Drm prime continues to assign handles to its prime fds an
will lead to have this handle which was just freed to
reassign again but to an prime buffer.

5.Now the overlay should be drawn into dumb buffer 4 which
still has the same handle but is backed by the wrong buffer.
This leads to two different behaviors:

- MPV crashes as the drm prime buffers size als calculated
by the decoder output format. The overlay output format
differs and it takes more space. SO the size check
in kernel fails.

- MPV is continuing play. This happens when the decoders
allocates a bigger buffer than needed for the overlay.
For example overlay is Full HD and decoder output is 4k.
This leads to the behavior das the overlay wil be drawn
into the wrong buffer as its a drm prime buffer and results
in a flicker every fourth step.
2020-03-05 18:12:57 +01:00
..
cocoa cocoa_common: remove deprecated VOCTRLs/VO_EVENTs 2019-12-12 19:56:03 +01:00
cocoa-cb cocoa-cb: remove unnecessary semicolons 2020-02-22 13:56:31 +01:00
d3d11 vo_gpu/d3d11: add support for configuring swap chain color space 2019-10-30 02:41:25 +02:00
gpu Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
hwdec vo_gpu: hwdec_vaapi: set correct hw_imgfmt value 2020-01-17 15:08:46 +01:00
opengl drm_prime: double free bug 2020-03-05 18:12:57 +01:00
placebo video/out/gpu: Add a `storable` flag to ra_format 2019-07-08 00:59:28 +02:00
vulkan wayland: remove wayland-frame-wait-offset option 2020-01-31 00:40:44 +00:00
win32 vo_gpu: win: remove exclusive-fullscreen detection hack 2017-12-20 14:53:41 +11:00
android_common.c context_android: move common code to a separate file 2019-09-27 00:05:06 +03:00
android_common.h context_android: move common code to a separate file 2019-09-27 00:05:06 +03:00
aspect.c aspect: add video margin options 2019-09-19 20:37:05 +02:00
aspect.h aspect: change license to LGPL 2017-06-17 17:08:51 +02:00
bitmap_packer.c video/out/bitmap_packer: Avoid empty initializer list 2019-11-18 16:50:21 +01:00
bitmap_packer.h
cocoa_cb_common.swift cocoa-cb: fix crash with some japanese characters 2020-02-22 14:21:06 +01:00
cocoa_common.h osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
cocoa_common.m mac, cocoa: fix UI updates on none main queue threads 2020-02-22 13:56:31 +01:00
d3d_shader_420p.h
d3d_shader_yuv.hlsl
dither.c
dither.h
dr_helper.c client API: fix potential deadlock problems by throwing more shit at it 2019-09-26 14:14:49 +02:00
dr_helper.h client API: fix potential deadlock problems by throwing more shit at it 2019-09-26 14:14:49 +02:00
drm_atomic.c drm_atomic: do not set immutable properties 2020-02-02 18:01:55 +02:00
drm_atomic.h drm: rename plane options to better, invariant, names 2018-12-01 15:42:20 +02:00
drm_common.c drm: avoid division by 0 in drm_pflip_cb with bad drivers 2019-12-07 18:34:25 +01:00
drm_common.h drm: avoid division by 0 in drm_pflip_cb with bad drivers 2019-12-07 18:34:25 +01:00
drm_prime.c drm_prime: double free bug 2020-03-05 18:12:57 +01:00
drm_prime.h drm_prime: double free bug 2020-03-05 18:12:57 +01:00
filter_kernels.c vo_opengl: refactor scaler LUT weight packing/loading 2017-09-04 13:53:14 +02:00
filter_kernels.h vo_opengl: refactor scaler LUT weight packing/loading 2017-09-04 13:53:14 +02:00
libmpv.h vo_libmpv: support render performance data 2018-11-13 20:43:29 +02:00
vo.c vo: redraw dropped frame if paused between queuing and drawing frame 2019-12-04 23:55:42 +01:00
vo.h vo: fix typo in comment 2020-02-09 18:32:28 +01:00
vo_caca.c vo_caca: Implement VOCTRL_UPDATE_WINDOW_TITLE 2019-10-29 17:07:41 +01:00
vo_direct3d.c Add checks for HAVE_GPL to various GPL-only source files 2017-10-10 15:51:16 +02:00
vo_drm.c vo_drm, wo_wlshm: mention that it's software scaling 2020-02-11 21:45:16 +01:00
vo_gpu.c Revert "vo: add support for externally driven renderloop and make wayland use it" 2019-10-10 17:41:19 +00:00
vo_image.c screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
vo_lavc.c encode: get rid of the output packet queue 2018-05-03 01:08:44 +03:00
vo_libmpv.c client API: fix potential deadlock problems by throwing more shit at it 2019-09-26 14:14:49 +02:00
vo_mediacodec_embed.c vo_mediacodec_embed: fix forgotten VO_CAP_NOREDRAW→VO_CAP_NORETAIN 2018-02-20 01:59:20 +02:00
vo_null.c vo.c, vo.h, vo_null.c: change license to LGPL 2017-05-10 15:06:20 +02:00
vo_rpi.c rpi: destroy fullscreen change handling 2019-12-11 18:50:37 +01:00
vo_sdl.c vo_sdl: use new fullscreen change mechanism 2019-12-11 18:47:57 +01:00
vo_tct.c video/out/vo_tct: Use octal escape sequence instead of non-standard \e 2019-11-18 16:50:21 +01:00
vo_vaapi.c vo: add warning message to vo_vaapi and vo_vdpau 2019-09-14 13:50:10 +02:00
vo_vdpau.c Replace uses of FFMIN/MAX with MPMIN/MAX 2019-10-31 11:24:20 +01:00
vo_wlshm.c vo_drm, wo_wlshm: mention that it's software scaling 2020-02-11 21:45:16 +01:00
vo_x11.c vo_x11: don't call X11 "crap" 2020-02-11 21:43:53 +01:00
vo_xv.c build: remove POSIX/sysv shared memory test 2017-12-02 23:19:13 +01:00
w32_common.c w32_common: support minimized and maximized properties 2020-01-26 15:36:12 +02:00
w32_common.h w32_common, w32_keyboard: change license to LGPL 2017-06-24 12:54:45 +02:00
wayland_common.c wayland: make resizing better 2020-02-13 20:28:59 +00:00
wayland_common.h wayland: make resizing better 2020-02-13 20:28:59 +00:00
win_state.c win_state: silence a valgrind warning 2019-09-19 20:37:05 +02:00
win_state.h x11: pseudo HiDPI scaling 2017-01-19 16:31:54 +01:00
x11_common.c x11: switch back to StaticGravity 2020-02-22 01:35:12 +01:00
x11_common.h x11: use new option stuff to implement fullscreen 2019-11-29 13:56:58 +01:00