diff --git a/include/decoder.h b/include/videoDecoder.h similarity index 100% rename from include/decoder.h rename to include/videoDecoder.h diff --git a/main.cc b/main.cc index 860f923..d7a378a 100644 --- a/main.cc +++ b/main.cc @@ -1,11 +1,12 @@ #include #include -#include #include #include +#define SDL_MAIN_HANDLED +#include #include "util.h" -#include "decoder.h" +#include "videoDecoder.h" #include "shaderService.h" #include "shader.h" using std::cout; @@ -151,7 +152,8 @@ void OpenglRenderVideo(VideoParam& videoParam, const OpenglVideoParam& openglVid glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, nullptr); } -int main(int argc, char** const argv) + +int main(int argc, char** argv) { // Check File const char* targetFilepath = argv[1]; diff --git a/src/decoder.cc b/src/videoDecoder.cc similarity index 98% rename from src/decoder.cc rename to src/videoDecoder.cc index a5a901a..7e6c326 100644 --- a/src/decoder.cc +++ b/src/videoDecoder.cc @@ -1,4 +1,4 @@ -#include "decoder.h" +#include "videoDecoder.h" #include #include using namespace std::literals::chrono_literals; @@ -37,6 +37,7 @@ void RequestPacket(VideoParam& param) { std::this_thread::sleep_for(100ms); continue; } + //FIX: const int ret = av_read_frame(fmtCtx, packet); if (param.eof) { std::this_thread::sleep_for(100ms);