Skip to content

Commit

Permalink
[GStreamer][WebRTC] Some tests hitting hashtable asserts
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261148

Reviewed by Xabier Rodriguez-Calvar.

Bail out from meta copy function if the transform type is not supported. The same check is done in
other implementations such as GstVideoMeta.

* Source/WebCore/platform/graphics/gstreamer/VideoFrameMetadataGStreamer.cpp:
(videoFrameMetadataGetInfo):

Canonical link: https://commits.webkit.org/267721@main
  • Loading branch information
philn committed Sep 7, 2023
1 parent 6710f7c commit 0580cc9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ const GstMetaInfo* videoFrameMetadataGetInfo()
auto* frameMeta = VIDEO_FRAME_METADATA_CAST(meta);
destroyVideoFrameMetadataPrivate(frameMeta->priv);
},
[](GstBuffer* buffer, GstMeta* meta, GstBuffer*, GQuark type, gpointer) -> gboolean {
[](GstBuffer* buffer, GstMeta* meta, GstBuffer*, GQuark type, gpointer data) -> gboolean {
if (!GST_META_TRANSFORM_IS_COPY(type))
return FALSE;

auto transformCopy = reinterpret_cast<GstMetaTransformCopy*>(data);
if (!transformCopy->region)
return FALSE;

auto* frameMeta = VIDEO_FRAME_METADATA_CAST(meta);
auto [buf, copyMeta] = ensureVideoFrameMetadata(buffer);
copyMeta->priv->videoSampleMetadata = frameMeta->priv->videoSampleMetadata;
Expand Down

0 comments on commit 0580cc9

Please sign in to comment.