Skip to content

Commit 6f95e80

Browse files
Shnatselthedataking
authored andcommitted
Return Option instead of Result, for consistency with bits_per_component()
1 parent 37058d9 commit 6f95e80

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/rust_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ impl Picture {
442442
}
443443

444444
/// Sample position for subsampled chroma.
445-
pub fn chroma_location(&self) -> Result<pixel::ChromaLocation, Rav1dError> {
446-
self.inner.seq_hdr.as_ref().unwrap().chr.try_into()
445+
pub fn chroma_location(&self) -> Option<pixel::ChromaLocation> {
446+
self.inner.seq_hdr.as_ref().unwrap().chr.try_into().ok()
447447
}
448448
}
449449

0 commit comments

Comments
 (0)