From c98c87afe29d9ef74bdced8a9c96d7752f3fe80f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 1 May 2014 14:32:45 +0100 Subject: Fix 3D support. --- src/lib/video_decoder.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/lib/video_decoder.cc') diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index bd609d168..146120fe1 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -39,19 +39,21 @@ VideoDecoder::VideoDecoder (shared_ptr c) } -optional +list VideoDecoder::decoded_video (VideoFrame frame) { + list output; + for (list::const_iterator i = _decoded_video.begin(); i != _decoded_video.end(); ++i) { if (i->frame == frame) { - return *i; + output.push_back (*i); } } - return optional (); + return output; } -optional +list VideoDecoder::get_video (VideoFrame frame, bool accurate) { if (_decoded_video.empty() || (frame < _decoded_video.front().frame || frame > (_decoded_video.back().frame + 1))) { @@ -59,7 +61,7 @@ VideoDecoder::get_video (VideoFrame frame, bool accurate) seek (ContentTime::from_frames (frame, _video_content->video_frame_rate()), accurate); } - optional dec; + list dec; /* Now enough pass() calls should either: * (a) give us what we want, or @@ -70,7 +72,7 @@ VideoDecoder::get_video (VideoFrame frame, bool accurate) * This could all be one statement but it's split up for clarity. */ while (true) { - if (decoded_video (frame)) { + if (!decoded_video(frame).empty ()) { /* We got what we want */ break; } @@ -94,7 +96,7 @@ VideoDecoder::get_video (VideoFrame frame, bool accurate) /* Any frame will do: use the first one that comes out of pass() */ while (_decoded_video.empty() && !pass ()) {} if (!_decoded_video.empty ()) { - dec = _decoded_video.front (); + dec.push_back (_decoded_video.front ()); } } -- cgit v1.2.3