mirror of
https://github.com/nextcloud/server.git
synced 2026-06-29 12:24:50 +02:00
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:
@@ -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]));
|
||||
|
||||
Reference in New Issue
Block a user