Skip to content

Avoid mutating shared default metadata objects in load_media - #59

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_995786918
Oct 8, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_995786918

Conversation

@copybara-service

Copy link
Copy Markdown

Avoid mutating shared default metadata objects in load_media

Using singleton objects (DEFAULT_IMAGE_METADATA / DEFAULT_VIDEO_METADATA)
caused container CICP parsing (e.g. for HDR AVIFs) to mutate the shared
object in memory, corrupting defaults for subsequent SDR files in tests
and in the application.

Use factory functions to return fresh metadata objects for each file.

@copybara-service
copybara-service Bot force-pushed the test_995786918 branch 2 times, most recently from 4aa78cf to cae8716 Compare October 8, 2026 13:15
Using singleton objects (DEFAULT_IMAGE_METADATA / DEFAULT_VIDEO_METADATA)
caused container CICP parsing (e.g. for HDR AVIFs) to mutate the shared
object in memory, corrupting defaults for subsequent SDR files in tests
and in the application.

Use factory functions to return fresh metadata objects for each file.

PiperOrigin-RevId: 995791573
@copybara-service
copybara-service Bot merged commit a62f76a into main Oct 8, 2026
4 checks passed
@copybara-service
copybara-service Bot deleted the test_995786918 branch October 8, 2026 13:19

This branch was successfully deployed

1 active deployment
github-pages — a62f76a1 Deployed Oct 8, 2026 by copybara-service[bot] via deploy #55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant