gint min_pool_size;
gboolean has_videometa;
gboolean need_negotiation;
+ gboolean need_sequence;
gboolean copy_frames;
struct v4l2_ctrl_h264_sps sps;
}
gst_v4l2_codec_h264_dec_fill_sequence (self, sps);
+ self->need_sequence = TRUE;
if (negotiation_needed) {
self->need_negotiation = TRUE;
/* *INDENT-OFF* */
struct v4l2_ext_control control[] = {
- {
- .id = V4L2_CID_STATELESS_H264_SPS,
- .ptr = &self->sps,
- .size = sizeof (self->sps),
- },
{
.id = V4L2_CID_STATELESS_H264_PPS,
.ptr = &self->pps,
},
{ },
{ },
+ { },
};
/* *INDENT-ON* */
goto done;
}
- /* Always set SPS, PPS, SCALING_MATRIX and DECODE_PARAMS */
- count = 4;
+ /* Always set PPS, SCALING_MATRIX and DECODE_PARAMS */
+ count = 3;
+
+ if (self->need_sequence) {
+ control[count].id = V4L2_CID_STATELESS_H264_SPS;
+ control[count].ptr = &self->sps;
+ control[count].size = sizeof (self->sps);
+ count++;
+ self->need_sequence = FALSE;
+ }
/* If it's not slice-based then it doesn't support per-slice controls. */
if (is_slice_based (self)) {