Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 465da60d authored by Johann's avatar Johann
Browse files

Indicate sync frames returned by encoder

Set the appropriate OMX flag when the encoder generates a keyframe. This
is necessary for any muxer which needs to indicate which frames are
seekable.

Bug: 8422347
Change-Id: I744a0b3023db24d3de2210bce82f41e50d259505
parent 6914de6d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -803,6 +803,8 @@ void SoftVPXEncoder::onQueueFilled(OMX_U32 portIndex) {
            if (encoded_packet->kind == VPX_CODEC_CX_FRAME_PKT) {
                outputBufferHeader->nTimeStamp = encoded_packet->data.frame.pts;
                outputBufferHeader->nFlags = 0;
                if (encoded_packet->data.frame.flags & VPX_FRAME_IS_KEY)
                  outputBufferHeader->nFlags |= OMX_BUFFERFLAG_SYNCFRAME;
                outputBufferHeader->nOffset = 0;
                outputBufferHeader->nFilledLen = encoded_packet->data.frame.sz;
                memcpy(outputBufferHeader->pBuffer,