From 651993ff60f885d33f085ce44e575c7e1c9db9ce Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 22 Oct 2012 23:59:36 -0500 Subject: [PATCH] Fixed a bug in the regression in the FFmpegReader class, which prevented frame 1 from loading --- src/FFmpegReader.cpp | 2 +- src/Main.cpp | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 48ba00e4..f164db2f 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -6,7 +6,7 @@ FFmpegReader::FFmpegReader(string path) throw(InvalidFile, NoStreamsFound, Inval : last_frame(0), is_seeking(0), seeking_pts(0), seeking_frame(0), seek_count(0), audio_pts_offset(99999), video_pts_offset(99999), working_cache(0), final_cache(820 * 1024), path(path), is_video_seek(true), check_interlace(false), check_fps(false), enable_seek(true), - rescaler_position(0), num_of_rescalers(32), is_open(false), seek_audio_frame_found(0), seek_video_frame_found(0) { + rescaler_position(0), num_of_rescalers(32), is_open(false), seek_audio_frame_found(-1), seek_video_frame_found(-1) { // Init FileInfo struct (clear all values) InitFileInfo(); diff --git a/src/Main.cpp b/src/Main.cpp index 820375fd..3953b1e8 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -38,25 +38,32 @@ int main() Timeline t(640, 360, Framerate(24,1)); // Add some clips - Clip c1(new FFmpegReader("/home/jonathan/Videos/sintel_trailer-720p.mp4")); + Clip c1(new FFmpegReader("/home/jonathan/Videos/sintel-1024-stereo.mp4")); c1.Position(0.0); // LINEAR Reverse //c1.time.AddPoint(1, 500, LINEAR); //c1.time.AddPoint(500, 1, LINEAR); - // LINEAR Fast Reverse (sounds wavy, due to periodic repeated frames) + // LINEAR Slow Reverse (sounds wavy, due to periodic repeated frames) //c1.time.AddPoint(1, 500, LINEAR); //c1.time.AddPoint(500, 100, LINEAR); - // LINEAR Slow Reverse (sounds wavy, due to periodic repeated frames) + // LINEAR Fast Reverse (sounds wavy, due to periodic repeated frames) //c1.time.AddPoint(1, 600, LINEAR); //c1.time.AddPoint(500, 1, LINEAR); // BEZIER Reverse - c1.time.AddPoint(1, 500); - c1.time.AddPoint(300, 1); - c1.time.AddPoint(500, 500); + openshot::Point p1(1,500); + p1.handle_left = Coordinate(1,500); + p1.handle_right = Coordinate(250,500); + + openshot::Point p2(500,100); + p1.handle_left = Coordinate(500,350); + p1.handle_right = Coordinate(500,100); + + c1.time.AddPoint(p1); + c1.time.AddPoint(p2); // c1.time.AddPoint(1, 500, LINEAR); // c1.time.AddPoint(500, 1, LINEAR);