v4l2slvp8dec: Only ask for output delay once per negotiation

While it's technically possible to change it per frame, asking for
that every frame is not very useful. This mimic H264 decoder better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
This commit is contained in:
Nicolas Dufresne 2021-06-16 10:30:18 -04:00 committed by GStreamer Marge Bot
parent 8d7e6bfb86
commit e5e2b6a652

View file

@ -169,6 +169,12 @@ gst_vp8_decoder_check_codec_change (GstVp8Decoder * self,
priv->had_sequence = TRUE;
if (klass->get_preferred_output_delay)
priv->preferred_output_delay =
klass->get_preferred_output_delay (self, priv->is_live);
else
priv->preferred_output_delay = 0;
if (klass->new_sequence)
ret = klass->new_sequence (self, frame_hdr);
}
@ -338,10 +344,6 @@ gst_vp8_decoder_handle_frame (GstVideoDecoder * decoder,
GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_PTS (in_buf)),
GST_TIME_ARGS (GST_BUFFER_DTS (in_buf)));
if (klass->get_preferred_output_delay)
priv->preferred_output_delay =
klass->get_preferred_output_delay (self, priv->is_live);
if (!gst_buffer_map (in_buf, &map, GST_MAP_READ)) {
GST_ERROR_OBJECT (self, "Cannot map buffer");