diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-07-05 16:34:57 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-07-05 16:34:57 +0100 |
| commit | 2de9e3f35b537f36880f493aef2bc889a2a18b92 (patch) | |
| tree | 31ecd47470540e884eaac8b99b55328a20ff92ed /rotord/rotor.cpp | |
| parent | afaf35edbad11bc7d71a6793116c229dcfc38f92 (diff) | |
preserve previous frame on seek fail
Diffstat (limited to 'rotord/rotor.cpp')
| -rwxr-xr-x | rotord/rotor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp index 3166de8..da711e5 100755 --- a/rotord/rotor.cpp +++ b/rotord/rotor.cpp @@ -391,9 +391,10 @@ Image* Video_loader::output(const Frame_spec &frame){ // int nothing=0; //} - if (!player.fetchFrame(frame.w,frame.h,wanted)) { + if (!player.fetchFrame(frame.w,frame.h,wanted)) { //seek fail cerr<<"Rotor: frame returned false"<<endl; - return nullptr; + if (image.w>0) return ℑ //just return the previous frame if possible + else return nullptr; }; image.setup_fromRGB(frame.w,frame.h,player.pFrameRGB->data[0]); return ℑ |
