mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1242807 - Fix mp4parse-rust's error reporting via telemetry. r=giles
This commit is contained in:
parent
33f6bafc2c
commit
c5aae23c29
@ -112,7 +112,7 @@ MP4Metadata::~MP4Metadata()
|
||||
|
||||
#ifdef MOZ_RUST_MP4PARSE
|
||||
// Helper to test the rust parser on a data source.
|
||||
static bool try_rust(const UniquePtr<mp4parse_state, FreeMP4ParseState>& aRustState, RefPtr<Stream> aSource)
|
||||
static int32_t try_rust(const UniquePtr<mp4parse_state, FreeMP4ParseState>& aRustState, RefPtr<Stream> aSource)
|
||||
{
|
||||
static LazyLogModule sLog("MP4Metadata");
|
||||
int64_t length;
|
||||
|
@ -124,7 +124,7 @@ pub unsafe extern "C" fn mp4parse_read(context: *mut MediaContext, buffer: *cons
|
||||
// result in an Ok(..) otherwise, meaning we could see
|
||||
// Ok(Err(Error::..)) here. So map thread failures back
|
||||
// to an mp4parse::Error before converting to a C return value.
|
||||
match task.join().or(Err(Error::AssertCaught)) {
|
||||
match task.join().unwrap_or(Err(Error::AssertCaught)) {
|
||||
Ok(_) => MP4PARSE_OK,
|
||||
Err(Error::InvalidData) => MP4PARSE_ERROR_INVALID,
|
||||
Err(Error::Unsupported) => MP4PARSE_ERROR_UNSUPPORTED,
|
||||
|
Loading…
Reference in New Issue
Block a user