GNOME Bugzilla – Bug 742212
h264parse: periodic SPS/PPS insertion stops after a seek backwards
Last modified: 2015-01-06 12:20:11 UTC
After a backwards seek, the h264parse element stops periodically inserting SPS/PPS nal units (I have the 'interval' property set). Logs show this is likely because of some broken timestamp logic: 0:00:22.846202966 5017 0x51b0f0 LOG h264parse gsth264parse.c:1722:gst_h264_parse_pre_push_frame:<h264parse0> now 0:00:19.486133333, last SPS/PPS 0:00:55.288566666 0:00:22.846374595 5017 0x51b0f0 DEBUG h264parse gsth264parse.c:1726:gst_h264_parse_pre_push_frame:<h264parse0> interval since last SPS/PPS 0:00:00.000000000
Created attachment 293582 [details] [review] Initial fix
Patch attached. Fixed by resetting h264parse->last_report on receipt of a SEGMENT event. I also modified the periodic SPS/PPS insertion logic a bit, so that SPS/PPS are sent the first time the logic is invoked, rather than after 'interval' seconds - without this, we'd have to wait for 1 second after a seek for video to appear. This wasn't an issue prior to the change, as because last_report wasn't reset, and so the diff was always > interval, forcing immediate SPS/PPS insertion.
commit ef71b6178ec56c0be9aac600d852f8d259f79760 Author: Duncan Palmer <dpalmer@digisoft.tv> Date: Fri Jan 2 00:59:00 2015 +0000 h264parse: Fix periodic SPS/PPS sending work after a seek Reset the interval variable to have SPS/PPS sending work after a (backwards) seek. https://bugzilla.gnome.org/show_bug.cgi?id=742212