GNOME Bugzilla – Bug 758405
h264/h265parse: Should resend pps/sps after seeks in byte-stream mode
Last modified: 2016-05-23 08:25:07 UTC
In byte-stream mode, the headers (PPS/SPS/etc) are not directly available from caps. After a flush, some decoders will forget the header completly, and wait until a new header is sent. With qtdemux (which produce AVC), this header will never come, and the decoder will never restart. This is the case for certain V4L2 M2M decoder, but also for avdec_h264 in byte-stream mode. To test this, one can use the playback test (from gst-plugins-base) this way: ./playback-test 1 "filesrc location=my.mov ! qtdemux ! h264parse ! video/x-h264,stream-format=byte-stream ! avdec_h264 ! glimagesink" Seek lead to high CPU, as the stream is being thrown away quickly while the decoder is searching for a header. (patch is coming). Another case where this could be a problem, is when the decoder is dynamically plugged. The reconfigure event could maybe have the same effect. I have no simple test for this one though.
Created attachment 316680 [details] [review] h26xparse: Resend PPS/SPS after seek This is to support byte-stream decoder that does not remember the PPS/SPS after a flush. This is not needed by all decoders, but is harmless for those that do remember.
Attachment 316680 [details] pushed as fe11609 - h26xparse: Resend PPS/SPS after seek
Will this fix be merged to 1.6.4?
> Will this fix be merged to 1.6.4? Only saw this now, so too late, sorry :)