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 768544 - [GST-VAAPI] Gstreamer not able to hardware decode H265 video using vaapidecode and fakesink.
[GST-VAAPI] Gstreamer not able to hardware decode H265 video using vaapidecod...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal normal
: 1.9.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-08 02:05 UTC by Allen Zhang
Modified: 2016-07-21 08:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch_initial_pointer_to_zero (610 bytes, patch)
2016-07-08 02:07 UTC, Allen Zhang
needs-work Details | Review
parse/decode SEI nalu in gst_vaapi_decoder_h265_decode_codec_data (889 bytes, patch)
2016-07-18 05:51 UTC, Allen Zhang
committed Details | Review

Description Allen Zhang 2016-07-08 02:05:37 UTC
Defect Description:

try run command:
gst-launch-1.0 -v filesrc location=<path/filename> ! matroskademux ! vaapidecode ! fpsdisplaysink video-sink=fakesink text-overlay=false

Gstreamer Caught SIGSEGV:

  • #0 poll
    at ../sysdeps/unix/syscall-template.S line 84
  • #1 ??
    from /usr/lib64/libglib-2.0.so.0
  • #2 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #3 gst_bus_poll
    from /usr/lib64/libgstreamer-1.0.so.0
  • #4 ??
  • #5 ??
  • #6 __libc_start_main
  • #7 ??


Spinning.  Please run 'gdb gst-launch-1.0 5792' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

Tested with software decode and there is no error found.
Comment 1 Allen Zhang 2016-07-08 02:07:17 UTC
Created attachment 331044 [details] [review]
patch_initial_pointer_to_zero
Comment 2 sreerenj 2016-07-08 08:27:01 UTC
Review of attachment 331044 [details] [review]:

I would rather prefer to add proper parse/decode of SEI headers if it present in codec_data.
It is simple, please add a 
"case  GST_H265_NAL_SUFFIX_SEI:
 case  GST_H265_NAL_PREFIX_SEI: and do like how we handled vps/sps/pps. All necessary internal parse/decode methods are readily available :)
Comment 3 Allen Zhang 2016-07-18 05:51:11 UTC
Created attachment 331677 [details] [review]
parse/decode SEI nalu in gst_vaapi_decoder_h265_decode_codec_data
Comment 4 Lim Siew Hoon 2016-07-20 02:20:43 UTC
Hi Sreerenj,

Once the code review done, can code patch provided by Allen Zhang push into 1.8 branch as well? We are using 1.8 branch code base.

Thank you.
Comment 5 sreerenj 2016-07-21 08:39:28 UTC
(In reply to Allen Zhang from comment #3)
> Created attachment 331677 [details] [review] [review]
> parse/decode SEI nalu in gst_vaapi_decoder_h265_decode_codec_data

Pushed your patch, But Please do git format-patch next time with proper commit message :)
Comment 6 sreerenj 2016-07-21 08:40:05 UTC
(In reply to Lim Siew Hoon from comment #4)
> Hi Sreerenj,
> 
> Once the code review done, can code patch provided by Allen Zhang push into
> 1.8 branch as well? 

Yup, make sense, pushed.

>We are using 1.8 branch code base.
> 
> Thank you.
Comment 7 sreerenj 2016-07-21 08:41:56 UTC
Review of attachment 331677 [details] [review]:

pushed, Thanks for the patch.

commit d9ef88230f3aaf17a6e6556fa4a116c3a3423a1d
Author: Allen Zhang <Zhang, Zhangfei>
Date:   Thu Jul 21 11:24:31 2016 +0300

    decoder: h265: handle the SEI NAL units included in codec_data
    
    The prefix/suffix SEI nal units can appear in codec_data too
    which weren't handled before. Parse these SEI headers to
    fix the segfault.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768544
Comment 8 sreerenj 2016-07-21 08:43:09 UTC
Closing