ffAudio / VideoExamples

Test examples for foleys_video_engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

foleys_AVReader.h throws accessviolation when opening a video file

heni40 opened this issue · comments

Hi,
I hope this is just me and not a bug.
I tried implementing a video window into a JUCE project and stumbled over this project what would fit very nicely for my needs.

The only thing is, I can't get the VideoPlayer running.
When loading a video file after selecting the file and loading it foleys_AVReader.h throws an accessviolation here:

bool isOpenedOK() const { return opened; }

the Error says:
“**this**” was “nullptr“

I did not change anything on the code.
What could be the problem?

Oh I see, I should probably check, if the engine actually returned a reader object.
However, it should always return an instance of FFmpegReader.
Did you by chance turn off the FFmpeg backend in the Projucer? Currently there is no alternative available. I hope to have in future the platform SDKs to choose from, like AVFoundation on mac and something else on windows, like DirectShow (haven't looked into that yet).

Thanks for the reply.
I actually tried it with ffmpeg on and off.
Gonna double check tonight though.

Although I had trouble integrating ffmpeg into the project but managed it in the end. Should work now. Tested the linking out in some other code and worked fine. Gonna look into ffmpeg deeper and the linking to the project, maybe that is the problem, although all links got resolved in the end. Reporting back later. Thanks

Ok, it was because FFmpeg was disabled and it took me some time to actually get it running under Visual Studio 2019 on Windows.
It now works as expected.
I thought it would be possible to not use FFmpeg, because the option exists.

Glad it works now. Maybe adding the switch already was a bit optimistic, but theoretically somebody could write their own reader/writer integration that way.
I'll close it now.