fyhertz / libstreaming

A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Apache License 2.0
3.49k stars 1.08k forks source link

Android-Android Couldn't skip mp4 header :/ #114

Open rerlanggas opened 9 years ago

rerlanggas commented 9 years ago

I am using example3 and getting this error "Couldn't skip mp4 header :/"

and got IOException : Try Again

for this code in VideoStream

try { byte buffer[] = new byte[4]; // Skip all atoms preceding mdat atom while (!Thread.interrupted()) { while (is.read() != 'm'); is.read(buffer,0,3); if (buffer[0] == 'd' && buffer[1] == 'a' && buffer[2] == 't') break; } } catch (IOException e) { Log.e(TAG,"Couldn't skip mp4 header :/"); stop(); throw e; }

daobenzhen commented 7 years ago

I also encountered the same problem, how do you solve this problem?

rerlanggas commented 7 years ago

@daobenzhen I'm sorry dude, I think the device is not supported mp4 method, just change your device