Bug Info ----------------------- Video can’t play normally after seek manually Garbage show or the screen will freeze. Steps ---------------------- 1. ./segoplayer 2. Press open and browser a video file 3. Seek to middle of the video 4. Video can’t play normally or garbage show
I can't reproduce the bug when use my local test file. Please provide the file which can reproduce the bug.
many files can reproduce this issue. e.g. H264_1920x1080_frame1020_HPL4.0.3gp H264_640x368_frame300.MP4
This issue may be associated with gstreamer-vaapi. When play a video ,then seek several times,there is an error in gstvaapidecode.c->gst_vaapidecode_step(),because there is a timeout when get surface.then the data buffer doesn't pass to next element .so we see the frames don't go forward.
Changzhi, you can discuss with Cong first. Cong once worked on seek issues.
Created attachment 76800 [details] When seek,screen freeze,the info of backtrace. When seek,the screen freeze ,this is relate to libva. Becase when seek,segment fault ,the next is info of backtrace. #0 0xb25f6682 in gen7_render_set_surface_state (ss=0xa877e020, bo=0x0, offset=0, width=1920, height=<optimized out>, pitch=1920, format=320, flags=0) at i965_render.c:773 #1 0xb25f69f2 in i965_render_src_surface_state (ctx=<optimized out>, index=1, region=0x0, offset=0, w=1920, h=1080, pitch=1920, format=320, flags=0) at i965_render.c:809 #2 0xb25f6dd4 in i965_render_src_surfaces_state (ctx=0xa0e48a0, surface=<optimized out>, flags=0) at i965_render.c:858 #3 0xb25f9b59 in gen7_render_setup_states (flags=0, dst_rect=0xae1fb678, src_rect=0xae1fb670, surface=67108869, ctx=0xa0e48a0) at i965_render.c:2381 #4 gen7_render_put_surface (flags=0, dst_rect=0xae1fb678, src_rect=0xae1fb670, surface=67108869, ctx=0xa0e48a0) at i965_render.c:2931 #5 intel_render_put_surface (ctx=0xa0e48a0, surface=67108869, src_rect=0xae1fb670, dst_rect=0xae1fb678, flags=0) at i965_render.c:3026 #6 0xb25fd3b8 in i965_put_surface_dri (ctx=0xa0e48a0, surface=67108869, draw=0x32006d2, src_rect=0xae1fb670, dst_rect=0xae1fb678, cliprects=0x0, num_cliprects=0, flags=0) at i965_output_dri.c:192 #7 0xb25df911 in i965_PutSurface (flags=0, number_cliprects=0, cliprects=0x0, desth=<optimized out>, destw=<optimized out>, desty=<optimized out>, destx=<optimized out>, srch=<optimized out>, srcw=<optimized out>, srcy=<optimized out>, srcx=<optimized out>, draw=0x32006d2, surface=67108869, ctx=0xa0e48a0) at i965_drv_video.c:3471 #8 i965_PutSurface (ctx=0xa0e48a0, surface=67108869, draw=0x32006d2, srcx=0, srcy=0, srcw=1920, srch=1080, destx=0, desty=31, destw=800, desth=450, cliprects=0x0, number_cliprects=0, flags=0) at i965_drv_video.c:3442 #9 0xb2b04da8 in vaPutSurface (dpy=0xa0e4490, surface=67108869, draw=52430546, srcx=0, srcy=0, srcw=1920, srch=1080, destx=0, desty=31, destw=800, desth=450, cliprects=0x0, number_cliprects=0, flags=0) at va_x11.c:261 #10 0xb346a809 in gst_vaapi_window_x11_render (window=0xa0b3338, surface=0xad40a858, src_rect=0xae1fb7e4, dst_rect=0xa0aa2b8, flags=0) at gstvaapiwindow_x11.c:425 #11 0xb2819fb1 in gst_vaapi_window_put_surface (window=0xa0b3338, surface=0xad40a858, src_rect=0xae1fb7e4, dst_rect=0xa0aa2b8, flags=0) at gstvaapiwindow.c:511 #12 0xb289fe7b in gst_vaapisink_put_surface (sink=0xa0aa0f0, surface=0xad40a858, flags=0) at gstvaapisink.c:799 #13 0xb28a012e in gst_vaapisink_show_frame (base_sink=0xa0aa0f0, buffer=0xa450e618) at gstvaapisink.c:854
Created attachment 77578 [details] [review] fix-surface-timeout-error when pause or seek, surface is not enough for decode,so waiting for surface before decode , if time out return error. it's a bug of gstreamer-vaapi. this patch fixed it.
Test OK. Issue can't be reproduced. Close it. libva: staging 5ec25c3d563d9ebd479a5ff978afe0a32f9cc00b intel-driver: staging 1fd62ffd336293dce7d091bcea8399a40ccea21e gst-vaapi: 0.4 533f11ac090c475fcceedcc9caf70ba766561541
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.