Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have used FFMpeg for video trim. loadBinary method of FFMpeg distorts the layout to LTR direction.I have instantiated its instance in a thread and also set the locale forcefully in Finish method of loadBinary method but that doesn't solves the issue. I am currently instantiating it at Application level. I am using the library 'com.writingminds:FFmpegAndroid:0.3.2'. Below is my code of instantiation

new Thread(new Runnable() {
        @Override
        public void run() {
            FFmpeg ffmpeg = FFmpeg.getInstance(context);
            try {
                ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
                    @Override
                    public void onStart() {}
                    @Override
                    public void onFailure() {}
                    @Override
                    public void onSuccess() {
                    @Override
                    public void onFinish() {
                        Locale locale = Locale.getDefault();
                        Resources resources =context.getResources();
                        Configuration config = resources.getConfiguration();
                        config.locale = locale;
                        if (Build.VERSION.SDK_INT >= 17) {
                            config.setLayoutDirection(locale);
                        resources.updateConfiguration(config, resources.getDisplayMetrics());
            } catch (FFmpegNotSupportedException e) {
    }).start();
                So did you used the ffmpeg library simply instantiating and calling loadBinary causes the above issue.
– Anuj Kalal
                May 29, 2019 at 6:58
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.