summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-14 22:05:45 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-14 22:05:45 +0100
commit2651ef8c2fd486332457630d459c1e620e626c1b (patch)
tree64fe628cbf7eb0b1d7999de23e10eab9835cfab6 /src/lib/ffmpeg_decoder.cc
parentcea83d339056dbd0213d1eb327accd96ea0c3b46 (diff)
Fix failure on 1-frame-back seek (#604).
I don't know why this works, but it's what 1.x has been using; I can't find any documentation on what AVSEEK_FLAG_BACKWARD is supposed to mean.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 6f91922eb..f8152b56e 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -316,7 +316,7 @@ FFmpegDecoder::seek (ContentTime time, bool accurate)
*/
ContentTime const u = time - _pts_offset;
- av_seek_frame (_format_context, _video_stream, u.seconds() / av_q2d (_format_context->streams[_video_stream]->time_base), 0);
+ av_seek_frame (_format_context, _video_stream, u.seconds() / av_q2d (_format_context->streams[_video_stream]->time_base), AVSEEK_FLAG_BACKWARD);
avcodec_flush_buffers (video_codec_context());