Bug 61834 - [segoplayer] Video can’t play normally after seek manually
Summary: [segoplayer] Video can’t play normally after seek manually
Status: VERIFIED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Weichangzhi
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-05 06:19 UTC by Du Yan
Modified: 2013-04-12 06:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
When seek,screen freeze,the info of backtrace. (4.24 KB, text/plain)
2013-03-20 05:24 UTC, Weichangzhi
Details
fix-surface-timeout-error (8.74 KB, patch)
2013-04-08 08:55 UTC, Zhong Cong
Details | Splinter Review

Description Du Yan 2013-03-05 06:19:14 UTC
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
Comment 1 Weichangzhi 2013-03-12 06:20:40 UTC
I can't reproduce the bug when use my local test file.
Please provide the file which can reproduce the bug.
Comment 2 Du Yan 2013-03-12 06:36:54 UTC
many files can reproduce this issue.
e.g.
H264_1920x1080_frame1020_HPL4.0.3gp
H264_640x368_frame300.MP4
Comment 3 Weichangzhi 2013-03-13 06:50:18 UTC
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.
Comment 4 Jocelyn Li 2013-03-13 08:17:00 UTC
Changzhi, you can discuss with Cong first. Cong once worked on seek issues.
Comment 5 Weichangzhi 2013-03-20 05:24:45 UTC
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
Comment 6 Zhong Cong 2013-04-08 08:55:05 UTC
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.
Comment 7 Yang Lianyue 2013-04-12 06:47:56 UTC
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.