diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-24 23:53:22 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-01-24 23:53:22 +0000 |
| commit | aebfa24afe42d80693df66318e5d2818ebf5989b (patch) | |
| tree | 8cbf568cbfbc371a0963bff313741776d87a934e /src | |
| parent | 952dc629d05500e45141239796458b450d4de895 (diff) | |
| parent | 468887f4c0994a58032f27018b622021131d1e8c (diff) | |
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/log_entry.cc | 2 | ||||
| -rw-r--r-- | src/lib/video_decoder.cc | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/log_entry.cc b/src/lib/log_entry.cc index d29b56747..99443e34a 100644 --- a/src/lib/log_entry.cc +++ b/src/lib/log_entry.cc @@ -50,7 +50,7 @@ LogEntry::get () const struct tm* t = localtime (&sec); strftime (buffer, 64, "%c", t); string a (buffer); - s << a.substr (0, a.length() - 1) << N_(": "); + s << a << N_(": "); } if (_type & TYPE_ERROR) { diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index 1de2cd806..38b9e8ced 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -247,11 +247,6 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame) _video_content->film()->log()->log (String::compose ("VD receives %1", frame), LogEntry::TYPE_DEBUG_DECODE); - /* We may receive the same frame index twice for 3D, and we need to know - when that happens. - */ - bool const same = (!_decoded_video.empty() && frame == _decoded_video.back().frame); - /* Work out what we are going to push into _decoded_video next */ list<ContentVideo> to_push; switch (_video_content->video_frame_type ()) { @@ -259,8 +254,14 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame) to_push.push_back (ContentVideo (image, EYES_BOTH, PART_WHOLE, frame)); break; case VIDEO_FRAME_TYPE_3D_ALTERNATE: + { + /* We receive the same frame index twice for 3D-alternate; hence we know which + frame this one is. + */ + bool const same = (!_decoded_video.empty() && frame == _decoded_video.back().frame); to_push.push_back (ContentVideo (image, same ? EYES_RIGHT : EYES_LEFT, PART_WHOLE, frame)); break; + } case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT: to_push.push_back (ContentVideo (image, EYES_LEFT, PART_LEFT_HALF, frame)); to_push.push_back (ContentVideo (image, EYES_RIGHT, PART_RIGHT_HALF, frame)); @@ -318,6 +319,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame) break; case VIDEO_FRAME_TYPE_3D_RIGHT: fill_one_eye (from.get(), to.get (), EYES_RIGHT); + break; } } |
