X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fmain.cpp;h=69ef55bedc33b89f2f85ad156e13e3b3708412c7;hb=4a2b75458cf7e5c341d12b476fe9f806c3f1e73c;hp=7343df189a3d86aa41ee357c9841aa60d723dab2;hpb=85e1c098fb61869cba7edf20a6281b2f87a7b9ed;p=nageru diff --git a/futatabi/main.cpp b/futatabi/main.cpp index 7343df1..69ef55b 100644 --- a/futatabi/main.cpp +++ b/futatabi/main.cpp @@ -240,7 +240,10 @@ int main(int argc, char **argv) { QSurface *surface = create_surface(); QOpenGLContext *context = create_context(surface); - make_current(context, surface); + if (!make_current(context, surface)) { + printf("oops\n"); + exit(1); + } CHECK(movit::init_movit(MOVIT_SHADER_DIR, movit::MOVIT_DEBUG_OFF)); delete_context(context); // TODO: Delete the surface, too. @@ -279,7 +282,7 @@ void load_frame_file(const char *filename, const string &basename, unsigned file if (!all_frames.empty()) { // We already had this cached in the database, so no need to look in the file. for (const DB::FrameOnDiskAndStreamIdx &frame : all_frames) { - if (frame.stream_idx >= 0 && frame.stream_idx < MAX_STREAMS) { + if (frame.stream_idx < MAX_STREAMS) { frames[frame.stream_idx].push_back(frame.frame); start_pts = max(start_pts, frame.frame.pts); }