From b9c7bc3ce26b8e6df4b6ad64d7b2d328525f7198 Mon Sep 17 00:00:00 2001
From: Good Guy <good1.2guy@gmail.com>
Date: Mon, 30 Jan 2017 14:51:55 -0700
Subject: [PATCH] add frame skew to ydiff

---
 cinelerra-5.1/cinelerra/ydiff.C | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cinelerra-5.1/cinelerra/ydiff.C b/cinelerra-5.1/cinelerra/ydiff.C
index bb8dda2d..c0322c39 100644
--- a/cinelerra-5.1/cinelerra/ydiff.C
+++ b/cinelerra-5.1/cinelerra/ydiff.C
@@ -367,6 +367,11 @@ int main(int ac, char **av)
   int64_t err = 0;
   int frm_no = 0;
 
+  if( ac>3 && (ret=atoi(av[3])) ) {
+    while( ret > 0 ) { a.read_frame(); --ret; }
+    while( ret < 0 ) { b.read_frame(); ++ret; }
+  }
+
   while( !done ) {
     AVFrame *ap = a.read_frame();
     if( !ap ) break;
-- 
2.26.2