mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1242807 - Fix mp4parse-rust's error reporting via telemetry. r=giles
This commit is contained in:
parent
4bc6562ad3
commit
4691552993
@ -112,7 +112,7 @@ MP4Metadata::~MP4Metadata()
|
|||||||
|
|
||||||
#ifdef MOZ_RUST_MP4PARSE
|
#ifdef MOZ_RUST_MP4PARSE
|
||||||
// Helper to test the rust parser on a data source.
|
// 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");
|
static LazyLogModule sLog("MP4Metadata");
|
||||||
int64_t length;
|
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
|
// result in an Ok(..) otherwise, meaning we could see
|
||||||
// Ok(Err(Error::..)) here. So map thread failures back
|
// Ok(Err(Error::..)) here. So map thread failures back
|
||||||
// to an mp4parse::Error before converting to a C return value.
|
// 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,
|
Ok(_) => MP4PARSE_OK,
|
||||||
Err(Error::InvalidData) => MP4PARSE_ERROR_INVALID,
|
Err(Error::InvalidData) => MP4PARSE_ERROR_INVALID,
|
||||||
Err(Error::Unsupported) => MP4PARSE_ERROR_UNSUPPORTED,
|
Err(Error::Unsupported) => MP4PARSE_ERROR_UNSUPPORTED,
|
||||||
|
Loading…
Reference in New Issue
Block a user