NULL resource when playing VP9 video through VDPAU on RX 570
Hi. Playing a VP9 video through VDPAU results in a segmentation fault due to a null pointer.
In vl_video_buffer.c, line 270, in mesa-19.3.0-rc6, the content of variables is the following:
buf->num_planes: 2
i: 1
plane_order: (const unsigned int *) 0x7fffefc643c8 <const_resource_plane_order_YVU>
plane_order[0]: 0
plane_order[1]: 2
res: 0x0
plane_order[1] is larger than the number of planes.
$ gdb --args mplayer foo.webm
(gdb) run
Thread 1 "mplayer" received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0 0x00007fffef7ab9c2 in vl_video_buffer_sampler_view_components (buffer=0x5555562f4520)
at mesa-19.3.0_rc6/work/mesa-19.3.0-rc6-abi_x86_64.amd64/../mesa-19.3.0-rc6/src/gallium/auxiliary/vl/vl_video_buffer.c:270
#1 0x00007fffef79b735 in vl_compositor_set_buffer_layer
(s=s@entry=0x55555619a148, c=c@entry=0x5555558f6018, layer=layer@entry=0, buffer=0x5555562f4520, src_rect=src_rect@entry=0x7fffffffc2c0, dst_rect=dst_rect@entry=0x0, deinterlace=VL_COMPOSITOR_WEAVE)
at mesa-19.3.0_rc6/work/mesa-19.3.0-rc6-abi_x86_64.amd64/../mesa-19.3.0-rc6/src/gallium/auxiliary/vl/vl_compositor.c:555
#2 0x00007fffef78d9b2 in vlVdpVideoMixerRender
(mixer=<optimized out>, background_surface=<optimized out>, background_source_rect=<optimized out>, current_picture_structure=VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME, video_surface_past_count=<optimized out>, video_surface_past=<optimized out>, video_surface_current=9, video_surface_future_count=1, video_surface_future=0x555555802dc0 <surface_render>, video_source_rect=0x555555802eb0 <src_rect_vid>, destination_surface=5, destination_rect=0x0, destination_video_rect=0x555555802ea0 <out_rect_vid>, layer_count=0, layers=0x0)
at mesa-19.3.0_rc6/work/mesa-19.3.0-rc6-abi_x86_64.amd64/../mesa-19.3.0-rc6/src/gallium/state_trackers/vdpau/mixer.c:342
#3 0x00005555555c6ae9 in video_to_output_surface () at libvo/vo_vdpau.c:276
#4 0x00005555555c7b14 in draw_image () at libvo/vo_vdpau.c:1130
#5 0x00005555555c7b14 in control () at libvo/vo_vdpau.c:1412
#6 0x0000555555624950 in put_image () at libmpcodecs/vf_vo.c:175
#7 0x00005555555f3f2c in filter_video () at libmpcodecs/dec_video.c:493
#8 0x000055555559c684 in generate_video_frame () at mplayer.c:1811
#9 0x000055555559c684 in update_video () at mplayer.c:2520
#10 0x000055555558fe1f in main () at mplayer.c:3813
Mplayer config:
$ cat ~/.mplayer/config
[default]
vc=ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffodivxvdpau,ffhevcvdpau,
vo=vdpau