summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/overlap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/overlap.c b/src/overlap.c
index 571e5b8..19134c3 100644
--- a/src/overlap.c
+++ b/src/overlap.c
@@ -88,12 +88,11 @@ main(int argc, char **argv)
struct video_decode *first_vd;
struct video_decode *second_vd;
struct video_frame *cur_frame = NULL, *last_frame = NULL;
-// struct video_frame last_frames[5] = {0};
int ret, ch;
int diff_flag = 0;
int64_t timestamp = 0;
- int64_t duration = 60 * 1000; /* duration for searching min_diff */
- /* 60 sec * 1000 msec = 1 min */
+ int64_t duration = 60 * 1000; /* duration for searching min_diff */
+ /* default 1 min = 60 sec * 1000 msec */
int64_t min_diff_time = 0; /* dts at overlaping frame */
double min_diff, diff = 0.0;
@@ -116,9 +115,6 @@ main(int argc, char **argv)
if (argc < 2)
usage();
-// if (argc == 2 && strtol(argv[1], NULL, 10) > 0)
-// timestamp = strtol(argv[1], NULL, 10);
-
ret = video_decode_init(&first_vd, argv[0], timestamp);
if (ret < 0)
return -ret;
@@ -128,6 +124,8 @@ main(int argc, char **argv)
for (int i = 0; video_decode_get_frame(first_vd, &last_frame) > 0; ++i);
ret = video_decode_init(&second_vd, argv[1], timestamp);
+ if (ret < 0)
+ return -ret;
for (int i = 0; video_decode_get_frame(second_vd, &cur_frame) > 0; ++i){
diff = frame_diff(last_frame, cur_frame);