mirror of
https://github.com/nextcloud/server.git
synced 2026-06-23 07:30:41 -04: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:
commit
14caffcc7b
1 changed files with 2 additions and 0 deletions
|
|
@ -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]));
|
||||
|
|
|
|||
Loading…
Reference in a new issue