New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault in hwdec_devices_get_first (devs=0x0) at ../video/hwdec.c:45 #4064

lvml opened this Issue Jan 24, 2017 · 0 comments


None yet
1 participant

lvml commented Jan 24, 2017

mpv version and platform

current git master

Reproduction steps

On a system that has no "hwdec" acceleration:

mpv --vf=lavfi=graph="scale=w=1920:h=1080" some_file.mp4

Expected behavior

does not crash

Actual behavior

crashes due to zero-pointer de-referentation:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79b5bd0 in pthread_mutex_lock () from /lib64/
(gdb) bt
#0  0x00007ffff79b5bd0 in pthread_mutex_lock () from /lib64/
#1  0x00000000004a224e in hwdec_devices_get_first (devs=0x0) at ../video/hwdec.c:45
#2  0x00000000004b0196 in recreate_graph (vf=vf@entry=0x8cbb50, fmt=fmt@entry=0x8cbba4) at ../video/filter/vf_lavfi.c:177
#3  0x00000000004b0317 in reconfig (vf=0x8cbb50, in=0x8cbba4, out=0x8cbbe4) at ../video/filter/vf_lavfi.c:224
#4  0x00000000004acdd7 in vf_reconfig_wrapper (p=0x7fffffffd7b0, vf=0x8cbb50) at ../video/filter/vf.c:617
#5  vf_reconfig (c=0x7f23f0, params=params@entry=0x7fffffffdae0) at ../video/filter/vf.c:655
#6  0x000000000047e8cd in filter_reconfig (mpctx=mpctx@entry=0x78f320, vo_c=0x7f5c00) at ../player/video.c:212
#7  0x000000000047eaa6 in video_filter (mpctx=mpctx@entry=0x78f320, eof=eof@entry=false) at ../player/video.c:642
#8  0x000000000047ebf7 in video_decode_and_filter (mpctx=mpctx@entry=0x78f320) at ../player/video.c:711
#9  0x00000000004803c8 in video_output_image (mpctx=0x78f320) at ../player/video.c:863
#10 write_video (mpctx=mpctx@entry=0x78f320) at ../player/video.c:1369
#11 0x000000000047b9ea in run_playloop (mpctx=mpctx@entry=0x78f320) at ../player/playloop.c:1089
#12 0x0000000000472c11 in play_current_file (mpctx=0x78f320) at ../player/loadfile.c:1262

(As a local work-around for me I added

struct mp_hwdec_ctx *hwdec_devices_get_first(struct mp_hwdec_devices *devs)
    if (devs == NULL) return NULL;


@wm4 wm4 closed this in 39adaf3 Jan 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment