diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-15 21:48:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-15 21:48:02 +0100 |
| commit | adf17c5e1992186c7f8d63d9cffd087311164ffa (patch) | |
| tree | 90eb0e04e702a0dcb60739ccdd938857dd16742c /src/lib/ffmpeg_decoder.cc | |
| parent | 040d5792b67e3ac1f3d023acc905b36748ddb85f (diff) | |
| parent | 1bb4bd728a445de0728c897211bf079c714d4f41 (diff) | |
Merge.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 18834c90e..11cea8fb1 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -338,7 +338,7 @@ FFmpegDecoder::seek (VideoContent::Frame frame, bool accurate) _video_position = rint ( (av_frame_get_best_effort_timestamp (_frame) * time_base + _video_pts_offset) * _ffmpeg_content->video_frame_rate() ); - + if (_video_position >= (frame - 1)) { av_free_packet (&_packet); break; @@ -451,6 +451,8 @@ FFmpegDecoder::decode_video_packet () /* This PTS is more than one frame forward in time of where we think we should be; emit a black frame. */ + + /* XXX: I think this should be a copy of the last frame... */ boost::shared_ptr<Image> black ( new Image ( static_cast<AVPixelFormat> (_frame->format), |
