qsvencoder: Clear caps after debug print

Otherwise debug function will print (null) for alread cleared pointer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2012>
This commit is contained in:
Seungha Yang 2022-03-24 02:52:45 +09:00
parent 188382ca9a
commit 769800ad5f
3 changed files with 12 additions and 3 deletions

View file

@ -813,7 +813,6 @@ gst_qsv_h264_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter)
downstream_profiles.insert (profile);
}
}
gst_clear_caps (&allowed_caps);
GST_DEBUG_OBJECT (self, "Downstream specified %" G_GSIZE_FORMAT " profiles",
downstream_profiles.size ());
@ -824,9 +823,13 @@ gst_qsv_h264_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter)
GST_WARNING_OBJECT (self,
"Allowed caps holds no profile field %" GST_PTR_FORMAT, allowed_caps);
gst_clear_caps (&allowed_caps);
return gst_video_encoder_proxy_getcaps (encoder, nullptr, filter);
}
gst_clear_caps (&allowed_caps);
/* Profile allows interlaced? */
/* *INDENT-OFF* */
gboolean can_support_interlaced = FALSE;

View file

@ -503,7 +503,6 @@ gst_qsv_h265_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter)
}
}
}
gst_clear_caps (&allowed_caps);
GST_DEBUG_OBJECT (self, "Downstream specified %" G_GSIZE_FORMAT " profiles",
downstream_profiles.size ());
@ -514,9 +513,13 @@ gst_qsv_h265_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter)
GST_WARNING_OBJECT (self,
"Allowed caps holds no profile field %" GST_PTR_FORMAT, allowed_caps);
gst_clear_caps (&allowed_caps);
return gst_video_encoder_proxy_getcaps (encoder, nullptr, filter);
}
gst_clear_caps (&allowed_caps);
template_caps = gst_pad_get_pad_template_caps (encoder->sinkpad);
template_caps = gst_caps_make_writable (template_caps);

View file

@ -391,7 +391,6 @@ gst_qsv_vp9_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter)
}
}
}
gst_clear_caps (&allowed_caps);
GST_DEBUG_OBJECT (self, "Downstream specified %" G_GSIZE_FORMAT " profiles",
downstream_profiles.size ());
@ -402,9 +401,13 @@ gst_qsv_vp9_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter)
GST_WARNING_OBJECT (self,
"Allowed caps holds no profile field %" GST_PTR_FORMAT, allowed_caps);
gst_clear_caps (&allowed_caps);
return gst_video_encoder_proxy_getcaps (encoder, nullptr, filter);
}
gst_clear_caps (&allowed_caps);
template_caps = gst_pad_get_pad_template_caps (encoder->sinkpad);
template_caps = gst_caps_make_writable (template_caps);