]> git.sesse.net Git - nageru/commitdiff
Fix more issues with paths in the database.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 27 Nov 2018 22:52:45 +0000 (23:52 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 29 Nov 2018 19:47:12 +0000 (20:47 +0100)
main.cpp

index 3aebe5a4e05151fe355689a89fe49859219136b7..95b3ff8cc85dc137df6bcb34496dc38d0f8a22c2 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -166,7 +166,12 @@ FrameOnDisk write_frame(int stream_idx, int64_t pts, const uint8_t *data, size_t
                                }
                        }
                }
-               db->store_frame_file(filename, size, frames_this_file);
+
+               const char *basename = filename.c_str();
+               while (strchr(basename, '/') != nullptr) {
+                       basename = strchr(basename, '/');
+               }
+               db->store_frame_file(basename, size, frames_this_file);
        }
 
        return frame;