Skip to content

Commit

Permalink
[GStreamer] Video encoder reconfiguration fails
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=258871

Reviewed by Xabier Rodriguez-Calvar.

We link videoconvert to videoscale and capsfilter, so unlinking also has to be done like this.

* Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp:
(videoEncoderSetEncoder):

Canonical link: https://commits.webkit.org/265797@main
  • Loading branch information
philn committed Jul 6, 2023
1 parent 053f200 commit 371f9f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static bool videoEncoderSetEncoder(WebKitVideoEncoder* self, EncoderId encoderId
auto sinkPad = adoptGRef(gst_element_get_static_pad(GST_ELEMENT_CAST(self), "sink"));
gst_ghost_pad_set_target(GST_GHOST_PAD(sinkPad.get()), sinkPadTarget.get());
} else {
gst_element_unlink(priv->videoConvert.get(), priv->inputCapsFilter.get());
gst_element_unlink_many(priv->videoConvert.get(), priv->videoScale.get(), priv->inputCapsFilter.get(), nullptr);
auto caps = adoptGRef(gst_caps_new_any());
g_object_set(priv->inputCapsFilter.get(), "caps", caps.get(), nullptr);
}
Expand Down

0 comments on commit 371f9f1

Please sign in to comment.