summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2014-05-14 20:06:02 +0100
committerTim Redfern <tim@eclectronics.org>2014-05-14 20:06:02 +0100
commitebc874413991fbc3d07493ece55f88f23e437af6 (patch)
tree0b41617db2be2bdb53e83f1f37c971ced7e4172a /rotord/src/libavwrapper.h
parentf3a687d33486a3d7a644a2110291124cb813cd67 (diff)
NT bugs cleaned and variable array type functional
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;