Trimming video in some devices faces fdsan errors
See original GitHub issueTrimming video is succeed, but after a while the app become stuck.The log reports a lot of fdsan and file descriptor errors.
Here is the code:
TransformationOptions transformationOptions = new TransformationOptions.Builder() .setGranularity(MediaTransformer.GRANULARITY_DEFAULT) .setSourceMediaRange(mediaRange) .build(); mMediaTransformer.transform(lastRequestId, Uri.parse(videoPathInput), videoPlayUrl,getVideoFormat(), null,listener,transformationOptions);
Here is the log: E/fdsan: failed to exchange ownership of file descriptor: fd 146 is owned by FILE* 0x76a2c1d970, was expected to be unowned E/fdsan: attempted to close file descriptor 133, expected to be unowned, actually owned by FILE* 0x76a2c1d710 E/fdsan: attempted to close file descriptor 146, expected to be owned by unique_fd 0x76a83e16dc, actually owned by FILE* 0x76a2c1d970.
Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
@RishabJaiswal I think you are right, this looks like something that could be caused by scoped storage. @tianshangaimi12 there is an incoming PR that adds support for target Uri instead of a target file path, it should help with scoped storage issues. Alternatively, you can also use
transform(List<TrackTransform>)
API and use aMediaMuxerTarget
constructor that accepts aUri
That is great! I will close the issue for now. Let me know if you see any other problems.