Android MediaExtractor crash when decoding some mp4 files. Libc fatal signal 11
Asked Answered
J

1

0

I am using Google Grafika examples to display video on TextureView. "Double decode" to be more specific . Code work most of the time but for some mp4 files it crash giving only :

libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 7998

Same code works for webM files and most mp4 files. Place where I expect it to fail is :

extractor = new MediaExtractor();
extractor.setDataSource(sourceFile);

in MoviePlayer [L:113]

Any hint how to walk around or what might be the problem?

Jabalpur answered 23/10, 2015 at 6:42 Comment(9)
There's no native code in Grafika, so a native crash indicates a problem in the platform or with that specific device. You did tag both "libc" and "ffmpeg" though... are you using ffmpeg in your project?Chumash
libc tag is because error mention it. ffmpeg was auto suggested by SO. I am not using it in the project though.Jabalpur
@Jabalpur I have the similar issue. I want to paly four same videos in different angles. It works for some videos but for some videos lags, and for some videos it just won't play. Did you get any solution for it?Scrim
@Scrim : With MoviePlayer yes. But not simultaneously. If video lags check other formats. I had a lot of issues with webM for instance. MP4 worked fine , except some format crush the app. So if you control source of the videos play with encodings and formats and you might achieve desired result.Jabalpur
@Jabalpur I want to play 4 videos simultaneously in different angles. I have issues with large resolution mostly .mp4 videos only. I have checked Double decode code from Google grafika but it's too complex for me to implement it.Scrim
@Scrim Grafika Double Decode example is pretty self containing. Just copy few necessary classes and with just a few modification you can almost reuse their code entirely.Jabalpur
@Jabalpur I tied that but I cannot find a way to play video from SD card in that code.Scrim
@Jabalpur There are so many dependencies plus it required min sdk 18. Do you know any other way of achieving it?Scrim
@Jabalpur I'm able to play video but it does not have sound. Do you know code to play sound ?Scrim
F
-1

This is an error related to OpenGL-ES Apps

try adding this to your manifest:

  <uses-feature android:glEsVersion="0x00020000" android:required="true" />
  • Open AndroidManifest.xml, add android:allowClearUserData="true" tag to the application node.

    <application android:allowClearUserData="true"
    ....
    >
    

    This might help you

Farina answered 6/11, 2015 at 7:17 Comment(4)
unfortunately it did not helpJabalpur
you can do one more thing download grafika sample app from github compile it and test it to see if the issue is in that sample or not. It not then you might be doing something wrong in your code.Farina
I basically did that. Just cherry picked some of the classes and compiled them into the project. It works for some videos for some it does not. I thin @Chumash might be right. It might be device specific problem.Jabalpur
yes the error is CPU specific.. try another device to see what happens then.Farina

© 2022 - 2024 — McMap. All rights reserved.