Skip to content

Conversation

romanmeta
Copy link
Contributor

Summary:
It is possible for a single video to have frames of different dimensions. Caching SwsContext across such frames results in all kinds of reliability issues (crashes, wrong data, etc.)

This diff makes sure that we only reuse cached SwsContext if the arguments to sws_getContext are the same.

Reviewed By: ahmadsharif1

Differential Revision: D65667262

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 8, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65667262

romanmeta added a commit to romanmeta/torchcodec that referenced this pull request Nov 8, 2024
…h#354)

Summary:

It is possible for a single video to have frames of different dimensions. Caching `SwsContext` across such frames results in all kinds of reliability issues (crashes, wrong data, etc.)

This diff makes sure that we only reuse cached `SwsContext` if the arguments to `sws_getContext` are the same.

Reviewed By: ahmadsharif1

Differential Revision: D65667262
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65667262

romanmeta added a commit to romanmeta/torchcodec that referenced this pull request Nov 8, 2024
…h#354)

Summary:

It is possible for a single video to have frames of different dimensions. Caching `SwsContext` across such frames results in all kinds of reliability issues (crashes, wrong data, etc.)

This diff makes sure that we only reuse cached `SwsContext` if the arguments to `sws_getContext` are the same.

Reviewed By: ahmadsharif1

Differential Revision: D65667262
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65667262

…h#354)

Summary:

It is possible for a single video to have frames of different dimensions. Caching `SwsContext` across such frames results in all kinds of reliability issues (crashes, wrong data, etc.)

This diff makes sure that we only reuse cached `SwsContext` if the arguments to `sws_getContext` are the same.

Reviewed By: ahmadsharif1

Differential Revision: D65667262
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65667262

@facebook-github-bot facebook-github-bot merged commit 4560f0e into meta-pytorch:main Nov 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants