Skip to content

Conversation

@PVince81
Copy link
Member

@PVince81 PVince81 commented Sep 18, 2021

If the first 5 MB are not enough to grab a useful frame for the
thumbnail preview, fall back to reading the full file.

Fixes #28694

To test you have to find a video file (mp4) that's big enough and for which thumbnail is not working.
I happened to have found one captured by my phone.

I've tested with master-key encryption as it will trigger the temporary file + use the first 5 MB logic.

Before the fix: some video files have no thumbnail.
After the fix: all video files have a thumbnail.

If the first 5 MB are not enough to grab a useful frame for the
thumbnail preview, fall back to reading the full file.

Signed-off-by: Vincent Petry <[email protected]>
@PVince81 PVince81 added the 3. to review Waiting for reviews label Sep 18, 2021
@PVince81 PVince81 self-assigned this Sep 18, 2021
@PVince81
Copy link
Member Author

/backport to stable22

@PVince81
Copy link
Member Author

/backport to stable21

@PVince81
Copy link
Member Author

/backport to stable20

Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

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

For loop seems a bit over the top, but logic is still fine :)

@PVince81
Copy link
Member Author

For loop seems a bit over the top, but logic is still fine :)

it was that or a copy paste or a separate function

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview generation for video files might fail for files greater 5MB

4 participants