jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4
GNU General Public License v2.0
180 stars 61 forks source link

CRASHING HERE219 #72

Closed bigfatbrowncat closed 6 years ago

bigfatbrowncat commented 8 years ago

I have a problem with this sample video: http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_50mb.mp4

[ error ] bool OMXAudioPlayer::decode(OMXPacket*): CRASHING HERE219

Your included version ("Timecoded_Big_bunny_1.mov") works perfect.

I think the problem could be somewhere around here:
[ error ] Unexpected OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS::coeff length
[verbose] OMXAudioDecoder::init Ouptut bps 16 samplerate 44100 channels 2 device hdmi buffer size 1058400 bytes per second 529200
[verbose] bool OMXAudioPlayer::openDecoder(): 
Audio codec : aac
Audio channels : 2
Audio samplerate : 44100
Audio bitspersample : 16

[ error ] Unexpected OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS::coeff length

Is it problem with decoder? With memory? I have no idea, could you give a tip?

jvcleave commented 8 years ago

Try encoding the audio as 48k. PCM also usually works pretty well

bigfatbrowncat commented 8 years ago

Is there any way to check if the audio stream is supported or not before the app crashes? :)

jvcleave commented 8 years ago

you can remove _Exit(0) line but I probably did that to stop the pi from locking up

bigfatbrowncat commented 8 years ago

I just want it to report "I can't play video" as a callback or something instead of locking, hanging or halt. Is it possible? I am trying to create a remotely-controlled video player and it's not good for it to crash on some unsupported video/audio formats.

jvcleave commented 8 years ago

Not sure. It's a condition that I don't understand (the audio codec gets changed mid-play?). I'll take a look at your video and see if I can replicate.

jvcleave commented 8 years ago

Not sure what is causing it yet but just updated master with bb2b96642eed0cd710ff67d72d175da839888fce so it doesn't exit. Be aware this may cause leaks further down the road.

It also doesn't have a way of calling you back yet