guard against mp4parser init class def error

This commit is contained in:
Thibault Deckers 2023-04-18 19:30:29 +02:00
parent 200f1a405f
commit 53d758ccbb
3 changed files with 6 additions and 0 deletions

View file

@ -281,6 +281,8 @@ object Mp4ParserHelper {
} }
} }
} }
} catch (e: NoClassDefFoundError) {
Log.w(LOG_TAG, "failed to parse MP4 for mimeType=$mimeType uri=$uri", e)
} catch (e: Exception) { } catch (e: Exception) {
Log.w(LOG_TAG, "failed to get User Data box by MP4 parser for mimeType=$mimeType uri=$uri", e) Log.w(LOG_TAG, "failed to get User Data box by MP4 parser for mimeType=$mimeType uri=$uri", e)
} }

View file

@ -175,6 +175,8 @@ object XMP {
} }
} }
} }
} catch (e: NoClassDefFoundError) {
Log.w(LOG_TAG, "failed to parse MP4 for mimeType=$mimeType uri=$uri", e)
} catch (e: Exception) { } catch (e: Exception) {
Log.w(LOG_TAG, "failed to get XMP by MP4 parser for mimeType=$mimeType uri=$uri", e) Log.w(LOG_TAG, "failed to get XMP by MP4 parser for mimeType=$mimeType uri=$uri", e)
} }

View file

@ -815,6 +815,8 @@ abstract class ImageProvider {
} }
} }
} }
} catch (e: NoClassDefFoundError) {
callback.onFailure(e)
} catch (e: Exception) { } catch (e: Exception) {
callback.onFailure(e) callback.onFailure(e)
return false return false