From 3fefbf2ec96cf89b47270472ea2b4764dcf746db Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Wed, 22 Jan 2025 22:02:45 +0100 Subject: [PATCH] Revert "Fix video decoder stalls issue in webgpu_video_frame.html (#30380)" (#30384) This reverts commit 574c8f8c669976e1994ae831ef925b3bd0dd68d4. --- examples/webgpu_video_frame.html | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/examples/webgpu_video_frame.html b/examples/webgpu_video_frame.html index 4a6b8034b56a88..99f14628fa4563 100644 --- a/examples/webgpu_video_frame.html +++ b/examples/webgpu_video_frame.html @@ -50,9 +50,6 @@ const decoder = new VideoDecoder( { output( frame ) { - // To avoid video decoder stalls, we should close the VideoFrame which is no longer needed. https://w3c.github.io/webcodecs/#dom-videodecoder-decode - if ( videoTexture.image instanceof VideoFrame ) videoTexture.image.close(); - videoTexture.setFrame( frame ); }, @@ -74,24 +71,9 @@ decoder.decode( chunk ); }, - setStatus( kind, status ) { - - console.info( 'MP4Demuxer:', kind ); - - if ( kind === 'fetch' && status === 'Done' ) { - - decoder.flush().then( () => { - - decoder.close(); - - // In case our VideoFrameTexture is no longer needed, we should close its backed VideoFrame, see issue #30379: - if ( videoTexture.image instanceof VideoFrame ) videoTexture.image.close(); - - videoTexture.image = null; - - } ); + setStatus( s ) { - } + console.info( 'MP4Demuxer:', s ); } } );