Merge pull request #43226 from jpsn123/master

movie preview bug fix, in some case stream reading functions may block indefinitely
This commit is contained in:
Louis 2026-06-11 17:28:54 +02:00 committed by GitHub
commit 14caffcc7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -343,6 +343,8 @@ class Movie extends ProviderV2 {
$returnCode = -1;
$output = '';
if (is_resource($proc)) {
stream_set_blocking($pipes[1], false);
stream_set_blocking($pipes[2], false);
// Read stderr before stdout: ffmpeg's stderr can exceed 64KB (OS pipe buffer) for certain
// files, causing a deadlock if stdout is read first. stdout is always empty.
$stderr = trim(stream_get_contents($pipes[2]));