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 763494 - h265parse: Segfault while tranforming hevc packetized stream to nal aligned bytestream
h265parse: Segfault while tranforming hevc packetized stream to nal aligned ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal critical
: 1.6.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
1.6.4
Depends on:
Blocks:
 
 
Reported: 2016-03-11 13:11 UTC by sreerenj
Modified: 2016-04-14 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample mkv stream (1.57 MB, video/x-matroska)
2016-03-11 13:11 UTC, sreerenj
  Details
videoparsers: h265: Fix segfault whiile trasforming to nal aligned bytestream (1.73 KB, patch)
2016-03-11 13:18 UTC, sreerenj
committed Details | Review

Description sreerenj 2016-03-11 13:11:13 UTC
Created attachment 323703 [details]
sample mkv stream

The following pipeline will segfault:

DISPLAY=:0 gst-launch-1.0 -v filesrc location= sample.mkv ! matroskademux ! h265parse ! "video/x-h265, stream-format=byte-stream, alignment=nal" ! vaapidecode ! vaapisink

Sample stream attached.
Comment 1 sreerenj 2016-03-11 13:18:03 UTC
Created attachment 323705 [details] [review]
videoparsers: h265: Fix segfault whiile trasforming to nal aligned bytestream
Comment 2 sreerenj 2016-03-11 13:20:27 UTC
It is high time for us to make a base_h264_h265_class !
Comment 3 Sebastian Dröge (slomo) 2016-03-11 14:26:42 UTC
Comment on attachment 323705 [details] [review]
videoparsers: h265: Fix segfault whiile trasforming to nal aligned bytestream

This code looks familiar ;) Thanks!
Comment 4 Luis de Bethencourt 2016-03-11 14:45:08 UTC
Sreerenj,
Thanks for the patch.

To whoever merges this,
I wouldn't nitpick if it wasn't in the subject line of the commit. Can you change the "whiile" into "while"?
Comment 5 Luis de Bethencourt 2016-03-11 15:24:53 UTC
gsth264parse and gsth265parse look to be in sync.

Except for implementation design details that I can sync *after* the freeze. For example gsth264parse moving a block of instructions to a function _reset_stream_info(), or gsth264parse using GST_H265_PARSER_OK and gsth265parse using GST_H265_PARSER_ERROR. function digit_to_string() and others defined at a different place of the file.

Making the implementation design of both match will make future syncing through diff a lot easier/faster. I will do this after the freeze.
Comment 6 sreerenj 2016-03-11 15:37:08 UTC
(In reply to Luis de Bethencourt from comment #4)
> Sreerenj,
> Thanks for the patch.
> 
> To whoever merges this,
> I wouldn't nitpick if it wasn't in the subject line of the commit. Can you
> change the "whiile" into "while"?

Aha sorry, going to push it... :)
Comment 7 sreerenj 2016-03-11 15:42:27 UTC
commit 92f4eb45abbe5ada79d8752b58949f2a73af6d90
Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date:   Fri Mar 11 17:34:03 2016 +0200

    videoparsers: h265: Fix segfault while transforming hevc to nal aligned bytestream
    
    Create temporary ParseFrame and copy the nal size buffer region
    for each nal unit like we did for h264.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763494
Comment 8 sreerenj 2016-03-11 15:43:12 UTC
Review of attachment 323705 [details] [review]:

Pushed.
Comment 9 Luis de Bethencourt 2016-03-11 17:15:06 UTC
Thanks Sreerenj! Great work :)