From 58a573299f43b3890d9368b8dcec4e28b4d3d79b Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 5 Apr 2016 10:15:25 +0200 Subject: [PATCH] Playback: accept MSW style absolute paths --- src/video_capture/import.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video_capture/import.cpp b/src/video_capture/import.cpp index 33b664b91..24a3202e6 100644 --- a/src/video_capture/import.cpp +++ b/src/video_capture/import.cpp @@ -304,7 +304,13 @@ try { "\t\t - overrides FPS from sequence metadata\n"); } while ((suffix = strtok_r(NULL, ":", &save_ptr)) != NULL) { - if (strcmp(suffix, "loop") == 0) { + if (suffix[0] == '\\') { // MSW path + assert(strlen(s->directory) == 1); // c:\something -> should be 'c' + char *tmp = (char *) malloc(2 + strlen(suffix) + 1); + sprintf(tmp, "%c:%s", s->directory[0], suffix); + free(s->directory); + s->directory = tmp; + } else if (strcmp(suffix, "loop") == 0) { s->loop = true; } else if (strncmp(suffix, "mt_reading=", strlen("mt_reading=")) == 0) {