summaryrefslogtreecommitdiff
path: root/rotord/libavwrapper.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-07-04 14:47:16 +0100
committerTim Redfern <tim@herge.(none)>2013-07-04 14:47:16 +0100
commitd80323174f5be46051dd494308a92cfe12e2c1f5 (patch)
tree578c7e4deb42f8e24c0a7c517f39392b84cfee35 /rotord/libavwrapper.cpp
parentfddff1ff3e50260b6518e754714b46e28fefaea6 (diff)
response to delete context
Diffstat (limited to 'rotord/libavwrapper.cpp')
-rwxr-xr-xrotord/libavwrapper.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/rotord/libavwrapper.cpp b/rotord/libavwrapper.cpp
index 08d943f..d5ee9cf 100755
--- a/rotord/libavwrapper.cpp
+++ b/rotord/libavwrapper.cpp
@@ -224,7 +224,7 @@ bool libav::decoder::openUsingInitializedContainer(enum PixelFormat formatParam)
- numFrames=container->streams[videoStream]->nb_frames-1;
+ numFrames=container->streams[videoStream]->nb_frames-2;
if (numFrames<1){
//some codecs don't keep this info in the header
@@ -311,7 +311,9 @@ bool libav::decoder::fetchFrame(int w, int h,int targetFrameIndex)
reinit_buffers_and_scaler();
}
- fetchFrame(targetFrameIndex);
+ //seems to crash out on the last frame, if it can be caught should maybe decrement number of frames
+
+ return fetchFrame(targetFrameIndex);
}
bool libav::decoder::fetchFrame(int targetFrameIndex)