WIP: amcvideoenc: Don't let baseclass finish frames for H.264 SPS/PPS buffers
amcvideoenc: Don't let baseclass finish frames for H.264 SPS/PPS buffers
These buffers would typically carry a bad zero timestamp (for MediaCodec it seems a timestamp of 0 means unset) and would finish a frame for something that does not even include a frame.
Also set the HEADER flag on this buffer.
This is essentially a forward port from gst-omx code logic changes in gst-omx commits 6617d6f577e and partially commit 4c9b8052c7, skipping the changes to support RPi OMX that splits header buffers into separate buffers and alignment=nal subframe-awareness.
Most notably this change stops the element from passing a zero timestamp header buffer downstream, which could result in a time jump in a muxer, while a zero time from Android MediaCodec seems to rather mean GST_CLOCK_TIME_NONE, not a time value with 0. However just keeping it GST_CLOCK_TIME_NONE in those cases appears to confuse GstAggregator thoroughly, so just adapt these parts of the code from gst-omx, as that appears to work out better.