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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/rotord/src/libavwrapper.h b/rotord/src/libavwrapper.h
index fc628c0..d6f411d 100644
--- a/rotord/src/libavwrapper.h
+++ b/rotord/src/libavwrapper.h
@@ -31,7 +31,7 @@ extern "C" {
namespace libav {
- // Some libavcodec calls are not reentrant
+ // Some libavcodec calls are not reentrant
void maybeInitFFMpegLib();
class video_decoder
@@ -77,6 +77,13 @@ namespace libav {
std::cerr<<"ffmpegsource: "<<err.Buffer<<std::endl;
return false;
}
+ std::cerr<<"fetching frame: "<<wanted<<" of "<<props->NumFrames<<" error: "<<err.Buffer<<std::endl;
+ //FFMS can crash inexplicably with some long mp4 files - examples are rosetest.mp4 ninahynes.mp4
+ //whatever the problem is it survives recompressing to mp4
+ //but converting to mov solves the problem
+ //weird, are the files actually damaged?
+ //need to test on a different machine
+ //best solution might be try/catch - how is this actually used? still crashes
frame = FFMS_GetFrame(source, std::max(0,wanted%props->NumFrames), &err);
if (frame == NULL) {
std::cerr<<"ffmpegsource: "<<err.Buffer<<std::endl;