Skip to content

movie preview bug fix, in some case stream reading functions may block indefinitely#43226

Merged
artonge merged 1 commit into
nextcloud:masterfrom
jpsn123:master
Jun 11, 2026
Merged

movie preview bug fix, in some case stream reading functions may block indefinitely#43226
artonge merged 1 commit into
nextcloud:masterfrom
jpsn123:master

Conversation

@jpsn123

@jpsn123 jpsn123 commented Jan 31, 2024

Copy link
Copy Markdown

Summary

For some reason, I need to run nextcloud as root, and in this case ffmpeg will block the process when it generates preview.

refencese:

https://www.php.net/manual/en/function.proc-open.php#97012
https://www.php.net/manual/en/function.stream-get-contents.php#106905

@jpsn123 jpsn123 changed the title bug fix, in some case stream reading functions may block indefinitely moive preview bug fix, in some case stream reading functions may block indefinitely Jan 31, 2024
@joshtrichards joshtrichards changed the title moive preview bug fix, in some case stream reading functions may block indefinitely moveie preview bug fix, in some case stream reading functions may block indefinitely Jan 31, 2024
@joshtrichards joshtrichards changed the title moveie preview bug fix, in some case stream reading functions may block indefinitely movie preview bug fix, in some case stream reading functions may block indefinitely Jan 31, 2024
@skjnldsv skjnldsv added the 2. developing Work in progress label Feb 21, 2024
@susnux susnux added this to the Nextcloud 30 milestone Apr 18, 2024
This was referenced Jul 30, 2024
This was referenced Aug 5, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
@blizzz blizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
This was referenced Jan 21, 2025
@blizzz blizzz mentioned this pull request Jan 29, 2025
1 task
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025

@blizzz blizzz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the documentation:

In non-blocking mode an fgets() call will always return right away while in blocking mode it will wait for data to become available on the stream.

Could be more exhaustive. Is it possible that we only receive incomplete data with this setting?

Comment thread lib/private/Preview/Movie.php Outdated
@jpsn123 jpsn123 requested a review from a team as a code owner May 21, 2025 07:18
@jpsn123 jpsn123 requested review from Altahrim, artonge and leftybournes and removed request for a team May 21, 2025 07:18
@blizzz

blizzz commented Jun 10, 2025

Copy link
Copy Markdown
Member

@jpsn123 thanks for the adaptions! Would you mind rebasing one more time?

@artonge

artonge commented Oct 21, 2025

Copy link
Copy Markdown
Collaborator

@jpsn123 sorry for the delay here. Can you sign off your commit?

git rebase HEAD~1 --signoff
git push --force-with-lease origin master

Then we should be good :)

This was referenced Jan 7, 2026
This was referenced Jan 14, 2026
This was referenced Jan 29, 2026
This was referenced Feb 11, 2026
@blizzz blizzz modified the milestones: Nextcloud 33, Nextcloud 34 Feb 16, 2026
This was referenced Jun 5, 2026
@susnux susnux added the community pull requests from community label Jun 9, 2026
@susnux susnux removed this from the Nextcloud 34.0.1 milestone Jun 9, 2026
…ctions may block indefinitly

Signed-off-by: cn-shell <jpsn@foxmail.com>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
@artonge artonge merged commit 14caffc into nextcloud:master Jun 11, 2026
73 of 139 checks passed
@welcome

welcome Bot commented Jun 11, 2026

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug community pull requests from community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants