Skip to content

Conversation

NicolasHug
Copy link
Contributor

No description provided.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 5, 2025
TORCH_CHECK(
deviceInterface_ != nullptr,
"No device interface available for video decoding. This ",
"shouldn't happen, please report.");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The new TORCH_CHECK is important but just as important is the change of the else if into a simple else

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add TORCH_CHECK(streamInfo.avMediaType == AVMEDIA_TYPE_VIDEO)? I believe that is also assumed.

Copy link
Contributor Author

@NicolasHug NicolasHug Sep 8, 2025

Choose a reason for hiding this comment

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

It's true that this is assumed but I think we can skip the check in the function, because this is heavily validated upstream in all callers, e.g. by calling validateActiveStream(...);

No strong opinion, I can add the check in a follow-up if you think it's good to validate it here as well.

@NicolasHug NicolasHug merged commit e12e466 into meta-pytorch:main Sep 8, 2025
49 of 51 checks passed
@NicolasHug NicolasHug deleted the deviceinterfacechec branch September 8, 2025 09:10
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants