Skip to content

Commit

Permalink
fix for gstreamer/video
Browse files Browse the repository at this point in the history
I think this is due to an unhandled edge case where VIDEO is enabled but
GSTREAMER is not used. Can leave this in place until we either re-enable
gstreamer or disable video entirely
  • Loading branch information
mnutt committed Dec 16, 2024
1 parent 70f6ec3 commit 6b70eea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,12 @@ ExceptionOr<Ref<WebCodecsVideoFrame>> WebCodecsVideoFrame::create(ScriptExecutio
if (!pixelBuffer)
return Exception { ExceptionCode::InvalidStateError, "Buffer has no frame"_s };

#if PLATFORM(QT) && ENABLE(VIDEO) && !USE(GSTREAMER)
// QTFIXME
RefPtr<VideoFrame> videoFrame = nullptr;
#else
auto videoFrame = VideoFrame::createFromPixelBuffer(pixelBuffer.releaseNonNull(), { PlatformVideoColorPrimaries::Bt709, PlatformVideoTransferCharacteristics::Iec6196621, PlatformVideoMatrixCoefficients::Rgb, true });
#endif

if (!videoFrame)
return Exception { ExceptionCode::InvalidStateError, "Unable to create frame from buffer"_s };
Expand Down

0 comments on commit 6b70eea

Please sign in to comment.