Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Fix #2149 Set colorspace and color_range ...#2150

Merged
WyattBlue merged 2 commits intomain from
patch
Feb 4, 2026
Merged

Fix #2149 Set colorspace and color_range ... #2150
WyattBlue merged 2 commits intomain from
patch

Conversation

@WyattBlue
Copy link
Member

@WyattBlue WyattBlue commented Feb 3, 2026

Set colorspace and color_range metadata on reformatted frames

When VideoFrame.reformat() is called with explicit dst_colorspace or dst_color_range parameters, the output frame's metadata now correctly reflects these values. Previously, the swscale conversion was performed but the frame metadata was not updated.

Changes:

  • Add SWS_CS_* to AVColorSpace mapping for correct metadata translation
  • Only set frame metadata when user explicitly specifies dst parameters
  • Preserve source frame metadata when dst params are not specified

Set colorspace and color_range metadata on reformatted frames
When VideoFrame.reformat() is called with explicit dst_colorspace or
dst_color_range parameters, the output frame's metadata now correctly
reflects these values. Previously, the swscale conversion was performed
but the frame metadata was not updated.
Changes:
- Add SWS_CS_* to AVColorSpace mapping for correct metadata translation
- Only set frame metadata when user explicitly specifies dst parameters
- Preserve source frame metadata when dst params are not specified
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@WyattBlue WyattBlue merged commit 3a02c09 into main Feb 4, 2026
6 checks passed
@WyattBlue WyattBlue deleted the patch branch February 4, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /