Backport of "androidmedia/enc: handle codec-data before popping GstVideoCodecFrames" into 1.22
requested to merge tpm/gstreamer:mr-5330-backport-into-1.22-androidmedia-handle-codec-data-before-frame into 1.22
Backport of !5330 (merged) "androidmedia/enc: handle codec-data before popping GstVideoCodecFrames".
Commits: