After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730650 - Pipeline using vaapi hangs
Pipeline using vaapi hangs
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-23 16:08 UTC by David Harks
Modified: 2016-07-27 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Harks 2014-05-23 16:08:51 UTC
I ran the following pipeline against git master:

gst-launch-1.0 playbin uri=file:///scratch/excite/content/Tap_Excite_Trickshots_01_h264_rf20.mp4 video-sink=vaapisink flags=video

Without flags=video, I get:

0:00:00.523620662  2329  0x8afa290 ERROR            vaapidecode gstvaapidecode.c:370:gst_vaapidecode_push_decoded_frame: video sink rejected the video buffer (error -4)

With flags=video, it plays, but hangs after EOS (see attached debug log), with the following message:
xvba_video: XVBA_DestroySurface(): status 2

lshw has this for my display hardware:
        *-display
             description: VGA compatible controller
             product: Wrestler [Radeon HD 7340]
             vendor: Hynix Semiconductor (Hyundai Electronics)
             physical id: 1
             bus info: pci@0000:00:01.0
             version: 00
             width: 32 bits
             clock: 33MHz
             capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
             configuration: driver=fglrx_pci latency=0
             resources: irq:48 memory:c0000000-cfffffff ioport:f000(size=256) memory:feb00000-feb3ffff

vainfo:
libva: VA-API version 0.32.0
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/i386-linux-gnu/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD

Note, I also tried with a different AVC file: http://www.elecard.com/assets/files/other/clips/Park_720p.mp4

With the same results.
Comment 2 David Harks 2014-05-24 12:11:26 UTC
I updated to libva 1.3.1 and tried again:

libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/fglrx_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

Same results. Is this an issue with the fglrx_drv_video (the xvba-video driver)?
Comment 3 David Harks 2014-05-24 15:56:14 UTC
Compiled my own xvba-driver from git and enabled tracing, then ran inside GDB to get a picture of what's happening. Looks like when XVBA_DestroySurface() returns an error, one of the threads deadlocks, and maybe even corrupts the stack.

Is there anything that I can do to narrow this down further?


8< -- snip --
vba_video: XVBAEndDecodePicture(): session 0x81ef630
xvba_video: XVBATransferSurface(): session 0x81ef630, from surface 0x81ff308, to GL surface 0xae6df558, flag XVBA_FRAME
xvba_video: XVBATransferSurface(): session 0x81ef630, from surface 0x8200798, to GL surface 0xae6df558, flag XVBA_FRAME
xvba_video: XVBATransferSurface(): session 0x81ef630, from surface 0x8200428, to GL surface 0xae6df558, flag XVBA_FRAME
xvba_video: XVBATransferSurface(): session 0x81ef630, from surface 0x81ffd48, to GL surface 0xae6df558, flag XVBA_FRAME
xvba_video: XVBATransferSurface(): session 0x81ef630, from surface 0x82000b8, to GL surface 0xae6df558, flag XVBA_FRAME
xvba_video: XVBATransferSurface(): session 0x81ef630, from surface 0x81ff668, to GL surface 0xae6df558, flag XVBA_FRAME
xvba_video: XVBATransferSurface(): session 0x81ef630, from surface 0x81fefa8, to GL surface 0xae6df558, flag XVBA_FRAME
Got EOS from element "playbin0".
Execution ended after 0:00:45.083878254
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
xvba_video: XVBADestroySurface(): surface 0x81ff9d8
xvba_video: XVBADestroySurface(): surface 0x81ff308
xvba_video: XVBADestroySurface(): surface 0x8200798
xvba_video: XVBADestroySurface(): surface 0x8200428
xvba_video: XVBADestroySurface(): surface 0x81ffd48
xvba_video: XVBADestroySurface(): surface 0x82000b8
xvba_video: XVBADestroySurface(): surface 0x81ff668
xvba_video: XVBADestroySurface(): surface 0x81fefa8
xvba_video: XVBADestroySurface(): surface 0xae6df558
xvba_video: XVBADestroyDecode(): session 0x81ef630
xvba_video: XVBA_DestroySurface(): status 2
[Thread 0xb01ffb40 (LWP 4178) exited]
[Thread 0xb57ffb40 (LWP 4176) exited]
[Thread 0xb61b2b40 (LWP 4175) exited]
[Thread 0xb763ab40 (LWP 4173) exited]
[Thread 0xb38ffb40 (LWP 4177) exited]
^C
Program received signal SIGINT, Interrupt.
0xb7d65d6b in pthread_mutex_lock () from /lib/i386-linux-gnu/libpthread.so.0
(gdb) bt
  • #0 pthread_mutex_lock
    from /lib/i386-linux-gnu/libpthread.so.0
  • #1 ??
    from /lib/ld-linux.so.2
  • #2 ___tls_get_addr
    from /lib/ld-linux.so.2
  • #3 ADL2_XServerInfo_DisplayHandle_Set
    from /usr/lib/fglrx/libatiadlxx.so
  • #4 ADL_XServerInfo_DisplayHandle_Set
    from /usr/lib/fglrx/libatiadlxx.so
  • #5 ??
    from /usr/lib/dri/fglrx_dri.so

Comment 4 sreerenj 2016-03-24 16:54:45 UTC
Moving to Product:GStreamer, Component:gstreamer-vaapi
Comment 5 Víctor Manuel Jáquez Leal 2016-07-27 15:42:31 UTC
Hi,

Other VA backends, besides intel or gallium, are blacklisted (bug 764673) because they are currently unmaintained. I'm closing this bug as invalid since it refers to libva-xbva-driver which is unmaintained, thus unsupported.

You can try with gallium backend, available in recent versions of mesa.