summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/libavwrapper.h')
-rw-r--r--rotord/src/libavwrapper.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rotord/src/libavwrapper.h b/rotord/src/libavwrapper.h
index 162a77e..fc628c0 100644
--- a/rotord/src/libavwrapper.h
+++ b/rotord/src/libavwrapper.h
@@ -77,7 +77,7 @@ namespace libav {
std::cerr<<"ffmpegsource: "<<err.Buffer<<std::endl;
return false;
}
- frame = FFMS_GetFrame(source, wanted%props->NumFrames, &err);
+ frame = FFMS_GetFrame(source, std::max(0,wanted%props->NumFrames), &err);
if (frame == NULL) {
std::cerr<<"ffmpegsource: "<<err.Buffer<<std::endl;
return false;