diff options
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
| -rw-r--r-- | rotord/src/libavwrapper.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp index d48cbc3..a6cb56d 100644 --- a/rotord/src/libavwrapper.cpp +++ b/rotord/src/libavwrapper.cpp @@ -65,9 +65,12 @@ bool libav::video_decoder::open(const std::string& filename){ } } if (makeindex) { - cerr<<"FFMS2: creating index "<<idxfile<<endl; index = FFMS_MakeIndex(filename.c_str(), 0, 0, NULL, NULL, FFMS_IEH_IGNORE, NULL, NULL, &err); - FFMS_WriteIndex(idxfile.c_str(),index,&err); + if (index) { + FFMS_WriteIndex(idxfile.c_str(),index,&err); + cerr<<"FFMS2: created index "<<idxfile<<endl; + } + cerr<<"FFMS2: "<<filename<<" cannot be indexed "<<endl; } if (index == NULL) { std::cerr<<"ffmpegsource: "<<err.Buffer<<std::endl; |
