So I have a function inside a win32 C++ console application like:
void initFFmpeg(string url ,string container, int w, int h, int fps)
{// we want to return here
encoder.SetConstants(fps, videoWidth, videoHeight, audioSampleRate);
// ... more code...
if (encoder.InitUrl(container, url, outputUserName) == -1)
{
// ...some more code...
// Now we want to return
}
// ... more code...
}
how to enable such returns?
It appears that what you’re trying to do is to keep trying various formats until ffmpeg successully opens the url. This is probably what you want to do (and IMHO cleaner than using a
goto).