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 722240 - h265parse: update caps when receive VPS/SPS
h265parse: update caps when receive VPS/SPS
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal major
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-15 06:41 UTC by leeduhui
Modified: 2014-01-21 06:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
h265parser:update caps when receive VPS/SPS (2.72 KB, patch)
2014-01-15 06:41 UTC, leeduhui
needs-work Details | Review
upate caps when receive VPS/SPS/PPS (1.35 KB, patch)
2014-01-20 08:08 UTC, leeduhui
committed Details | Review
fix segfault when parsing HRD parameter (1.39 KB, patch)
2014-01-20 08:08 UTC, leeduhui
committed Details | Review
test stream (1.53 MB, text/vnd.trolltech.linguist)
2014-01-20 08:19 UTC, leeduhui
  Details

Description leeduhui 2014-01-15 06:41:53 UTC
Created attachment 266338 [details] [review]
h265parser:update caps when receive VPS/SPS

1. update caps when revceive VPS/SPS : some video decoder want to get the video information before decoding . ( in UD )
 2. if exist vps->num_hrd_parameters, do parsing hrd_parameters. : occurred seg fault when hrd parameter. so I fixed this issue.
Comment 1 Sebastian Dröge (slomo) 2014-01-15 11:29:03 UTC
Review of attachment 266338 [details] [review]:

In general, can you provide a stream to reproduce these? :)

::: gst-libs/gst/codecparsers/gsth265parser.c
@@ +1757,3 @@
+              vps->cprms_present_flag, vps->max_sub_layers_minus1))
+        goto error;
+    }

Can you put this part into a separate patch?

::: gst/videoparsers/gsth265parse.c
@@ +1835,3 @@
+      /* we did parse codec-data and might supplement src caps */
+      gst_h265_parse_update_src_caps (h265parse, caps);
+    }

After this change you only set the src caps if sps, vps and pps have been parsed, right? Will we queue all buffers until that is the case?
Comment 2 Sebastian Dröge (slomo) 2014-01-15 11:32:48 UTC
Review of attachment 266338 [details] [review]:

::: gst/videoparsers/gsth265parse.c
@@ +1835,3 @@
+      /* we did parse codec-data and might supplement src caps */
+      gst_h265_parse_update_src_caps (h265parse, caps);
+    }

Ignore the comment for this part. But you should put it into a separate patch, and also you forget to check for PPS there and might want to update the comment too :)

Related bug in h264parse: bug #705452
Comment 3 Sebastian Dröge (slomo) 2014-01-15 11:35:06 UTC
Also the fix to h264parse seems to have caused bug #721384 so need to check if this happens here too
Comment 4 leeduhui 2014-01-20 08:08:02 UTC
Created attachment 266700 [details] [review]
upate caps when receive VPS/SPS/PPS
Comment 5 leeduhui 2014-01-20 08:08:54 UTC
Created attachment 266701 [details] [review]
fix segfault when parsing HRD parameter
Comment 6 leeduhui 2014-01-20 08:18:15 UTC
I added 2 separate patch .

1. update caps when receive VPS/SPS/PPS .

I want wait push buffer until parsed VPS/SPS/PPS. actually video decoder will be ignore any frame before receive VPS/SPS/PPS.
And I did some test by your comment ( https://bugzilla.gnome.org/show_bug.cgi?id=721384 )

 gst-launch-1.0 -v filesrc location="/home/leeduhui/temp/20140108/30sexy_LG_60_scalefit_d-mov-output.ts" ! tsdemux name=d d.video_0101 ! queue ! h265parse ! fakesink silent=false

 it seems to be fine works.
 
you can check added test stream. name is Rain_LG_60P.ts 


2. fix segfault when parsing HRD parameter
if exist vps->num_hrd_parameters, do parsing hrd_parameters. : occurred seg
fault when hrd parameter. so I fixed this issue.
Comment 7 leeduhui 2014-01-20 08:19:03 UTC
Created attachment 266703 [details]
test stream
Comment 8 Sebastian Dröge (slomo) 2014-01-20 09:05:56 UTC
commit cd8c0227c8e5b4322052097131da20c04dbf68d0
Author: duhui.lee <duhui.lee@lge.com>
Date:   Mon Jan 20 15:21:42 2014 +0900

    h265parse: Update caps when receive VPS/SPS/PPS
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722240

commit 13a397a0b92b4c68cbe328095947887c10335e7e
Author: duhui.lee <duhui.lee@lge.com>
Date:   Mon Jan 20 17:03:09 2014 +0900

    h265parser: Fix segfault when parsing HRD parameter
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722240