]> git.sesse.net Git - nageru/blobdiff - main.cpp
Make it possible to change the working directory.
[nageru] / main.cpp
index 1266c2ab13e546cf329a1b91f5142c6a9e436e7c..bf9757533fa5a1fd7d46473e9c411ec70c9f5663 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -50,7 +50,8 @@ int64_t current_pts = 0;
 string filename_for_frame(unsigned stream_idx, int64_t pts)
 {
        char filename[256];
-       snprintf(filename, sizeof(filename), "frames/cam%d-pts%09ld.jpeg", stream_idx, pts);
+       snprintf(filename, sizeof(filename), "%s/frames/cam%d-pts%09ld.jpeg",
+               global_flags.working_directory.c_str(), stream_idx, pts);
        return filename;
 }