mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
mfc: Don't reconfigure if we get compatible caps
This commit is contained in:
parent
bee7328210
commit
c3c33d88d4
1 changed files with 6 additions and 0 deletions
|
@ -185,6 +185,11 @@ gst_mfc_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Setting format: %" GST_PTR_FORMAT, state->caps);
|
GST_DEBUG_OBJECT (self, "Setting format: %" GST_PTR_FORMAT, state->caps);
|
||||||
|
|
||||||
|
if (self->input_state && gst_caps_can_intersect (self->input_state->caps, state->caps)) {
|
||||||
|
GST_DEBUG_OBJECT (self, "Compatible caps");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
s = gst_caps_get_structure (state->caps, 0);
|
s = gst_caps_get_structure (state->caps, 0);
|
||||||
|
|
||||||
if (self->context) {
|
if (self->context) {
|
||||||
|
@ -220,6 +225,7 @@ gst_mfc_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
|
||||||
|
|
||||||
gst_buffer_replace (&self->codec_data, state->codec_data);
|
gst_buffer_replace (&self->codec_data, state->codec_data);
|
||||||
|
|
||||||
|
done:
|
||||||
if (self->input_state)
|
if (self->input_state)
|
||||||
gst_video_codec_state_unref (self->input_state);
|
gst_video_codec_state_unref (self->input_state);
|
||||||
self->input_state = gst_video_codec_state_ref (state);
|
self->input_state = gst_video_codec_state_ref (state);
|
||||||
|
|
Loading…
Reference in a new issue