Open Hackmodford opened 5 years ago
someone know how to fix this issue. .mp4 file is successful. mov is fail
Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (greylist, JNI, allowed) use public void setDataSource(Context context, Uri uri) anyone know how to fix
I can confirm this..
When selecting a file with the following name test#12%34.mp4
, for example, you will get the following crash:
Caused by java.lang.IllegalArgumentException: setDataSource failed: status = 0xFFFFFFFF
at wseemann.media.FFmpegMediaMetadataRetriever.setDataSource(FFmpegMediaMetadataRetriever.java)
at wseemann.media.FFmpegMediaMetadataRetriever.setDataSource + 222(FFmpegMediaMetadataRetriever.java:222)
at com.your.package.name$ThumbnailRetrievalTask.doInBackground + 2990(name.java:2990)
at com.your.package.name$ThumbnailRetrievalTask.doInBackground + 2975(name.java:2975)
at android.os.AsyncTask$2.call + 333(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run + 266(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run + 245(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker + 1167(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run + 641(ThreadPoolExecutor.java:641)
at java.lang.Thread.run + 764(Thread.java:764)
Try this, I also face this problem:
if (path.startsWith("http")) {
try {
int index = path.lastIndexOf("/");
if (index > 0) {
String sub = path.substring(index + 1);
path = path.substring(0, index + 1) + URLEncoder.encode(sub, "utf-8");
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
I can confirm this..
When selecting a file with the following name
test#12%34.mp4
, for example, you will get the following crash:Caused by java.lang.IllegalArgumentException: setDataSource failed: status = 0xFFFFFFFF at wseemann.media.FFmpegMediaMetadataRetriever.setDataSource(FFmpegMediaMetadataRetriever.java) at wseemann.media.FFmpegMediaMetadataRetriever.setDataSource + 222(FFmpegMediaMetadataRetriever.java:222) at com.your.package.name$ThumbnailRetrievalTask.doInBackground + 2990(name.java:2990) at com.your.package.name$ThumbnailRetrievalTask.doInBackground + 2975(name.java:2975) at android.os.AsyncTask$2.call + 333(AsyncTask.java:333) at java.util.concurrent.FutureTask.run + 266(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run + 245(AsyncTask.java:245) at java.util.concurrent.ThreadPoolExecutor.runWorker + 1167(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run + 641(ThreadPoolExecutor.java:641) at java.lang.Thread.run + 764(Thread.java:764)
I also face this problem
FFmpegMediaMetadataRetriever crashes when certain chars are used in the path.
I iterated through all the UTF-8 characters to find which ones would cause the crash.
This is how I am using a File to set the datasource.
Should FFmpegMediaMetadataRetriever be able to handle this, or do I need to check for these characters in file names?