Uncoditionally request keyframes

This commit is contained in:
Nicolas Werner 2023-01-31 17:40:58 +01:00
parent 5ed3bfc8f8
commit 9f529075f0
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -301,10 +301,9 @@ testPacketLoss(gpointer G_GNUC_UNUSED)
void void
setWaitForKeyFrame(GstBin *decodebin G_GNUC_UNUSED, GstElement *element, gpointer G_GNUC_UNUSED) setWaitForKeyFrame(GstBin *decodebin G_GNUC_UNUSED, GstElement *element, gpointer G_GNUC_UNUSED)
{ {
if (!std::strcmp( // Unconditionally enable keyframe wait and requesting keyframes, so that we do that for
gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(gst_element_get_factory(element))), // every decode, not just vp8 decoding
"rtpvp8depay")) g_object_set(element, "wait-for-keyframe", TRUE, "request-keyframe", TRUE, nullptr);
g_object_set(element, "wait-for-keyframe", TRUE, nullptr);
} }
GstElement * GstElement *