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

Opening http stream sometimes causes segmentation fault. #69

Closed woudsma closed 6 years ago

woudsma commented 8 years ago

So i'm trying to open a live video stream from a "master" Raspberry PI through LAN, like this:

ofxOMXPlayerSettings settings;
settings.videoPath = "http://192.168.1.20:8080/stream";

6/10 times this works flawlessly, but for the rest i'm getting a segfault.

[notice ] bool OMXReader::open(std::string, bool): avformat_find_stream_info TOOK 5003 MS
[notice ] bool ofxOMXPlayerEngine::didReadFile(bool): didOpenMovie TOOK 5137 MS
[warning] bool ofxOMXPlayerEngine::setup(ofxOMXPlayerSettings&): FAST PATH MOVE OPEN FAILED - LIKELY A STREAM, TRYING SLOW PATH
Segmentation fault
../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:168: recipe for target 'run' failed
make: *** [run] Error 139

I'm trying to edit ofxOMXPlayerEngine to reconnect after failing to open the stream the first time. Not getting anywhere so far. I want the application to listen for the stream, and connect whenever it is ready. Even when the master sends out no video for a second. Whenever i try to call the didOpenMovie = didReadFile(doSkipAvProbe); or didOpenMovie = omxReader.open(moviePath.c_str(), doSkipAvProbe); again, i also get a segmentation fault. Not sure if i need to clean up variables set inside omxReader.open() when it is executed the first time. Or if i'm staring at the wrong piece of code.

When the current video sent out by the master stops, and the next video in the playlist is up, the application crashes too. Preferably the application should not crash, and just play the next video..

Can someone please enlighten me?

jvcleave commented 8 years ago

It sounds like libav can't detect the format of the stream