omxvideodec: fix OMX flags on header buffer

The header (SPS/PPS) buffer should have the CODECONFIG flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-omx/-/merge_requests/49>
This commit is contained in:
Guillaume Desmottes 2021-07-09 15:14:15 +02:00 committed by Stéphane Cerveau
parent 006e0636fd
commit 503db0f1af

View file

@ -3125,7 +3125,6 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
}
buf->omx_buf->nFlags |= OMX_BUFFERFLAG_CODECCONFIG;
buf->omx_buf->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME;
if (GST_CLOCK_TIME_IS_VALID (timestamp))
GST_OMX_SET_TICKS (buf->omx_buf->nTimeStamp,
@ -3205,6 +3204,9 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
if (first_ouput_buffer && GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame))
buf->omx_buf->nFlags |= OMX_BUFFERFLAG_SYNCFRAME;
if (header)
buf->omx_buf->nFlags |= OMX_BUFFERFLAG_CODECCONFIG;
/* TODO: Set flags
* - OMX_BUFFERFLAG_DECODEONLY for buffers that are outside
* the segment