summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-16 14:04:05 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-16 14:04:05 +0000
commit1073b0ea3f80e1c941fd36546994ec053c5407c9 (patch)
treeb98323da7dba31f075f3b4098c86cf7e02fe9f6f /src/lib/ffmpeg_decoder.cc
parentbd75347a20c3952954121ce00ec2ac6fa62a01ac (diff)
Various fixes.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 9fd6a0c05..314ab7c06 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -547,8 +547,11 @@ FFmpegDecoder::filter_and_emit_video (AVFrame* frame)
list<shared_ptr<Image> > images = graph->process (frame);
+ SourceFrame const sf = av_q2d (_format_context->streams[_video_stream]->time_base)
+ * av_frame_get_best_effort_timestamp(_frame) * frames_per_second();
+
for (list<shared_ptr<Image> >::iterator i = images.begin(); i != images.end(); ++i) {
- emit_video (*i);
+ emit_video (*i, sf);
}
}
@@ -558,11 +561,6 @@ FFmpegDecoder::seek (SourceFrame f)
int64_t const t = static_cast<int64_t>(f) / (av_q2d (_format_context->streams[_video_stream]->time_base) * frames_per_second());
int const r = av_seek_frame (_format_context, _video_stream, t, 0);
avcodec_flush_buffers (_video_codec_context);
-
- if (r >= 0) {
- OutputChanged ();
- }
-
return r < 0;
}