lalongooo / video-compressor

Video compressor based in the Telegram for Android app source code.
GNU General Public License v2.0
262 stars 88 forks source link

IllegalStateException at "dequeueOutputBuffer()" #33

Open narendra88 opened 7 years ago

narendra88 commented 7 years ago

I tried to pick video from gallery and compressing it using this in 2 devices yet so far ( LG Nexus 5 & Samsung Galaxy Grand - GT-I9082 ).

It worked fine in LG Nexus 5, but failed in "Samsung Galaxy Grand", without even mentioning the error.

For that, I debugged and placed logs in MediaController class (com.iceteck.silicompressorr.videocompression.MediaController)

Thus able to track the error Please suggest any fix or workaround for that, in order to make it work on all devices

The error I got is as follows -

> java.lang.IllegalStateException
> at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
> at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
> at com.iceteck.silicompressorr.videocompression.MediaController.convertVideo(MediaController.java:491)
> at com.iceteck.silicompressorr.SiliCompressor.compressVideo(SiliCompressor.java:300)
> at com.iceteck.silicompressor.SelectPictureActivity$VideoCompressAsyncTask.doInBackground(SelectPictureActivity.java:379)
> at com.iceteck.silicompressor.SelectPictureActivity$VideoCompressAsyncTask.doInBackground(SelectPictureActivity.java:358)
> at android.os.AsyncTask$2.call(AsyncTask.java:288)
> at java.util.concurrent.FutureTask.run(FutureTask.java:237)
> at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> at java.lang.Thread.run(Thread.java:818)
>