diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-22 14:47:30 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-22 14:47:30 +0100 |
| commit | f5e1b7238cb49ad77c313c0cacda4af1ce1b920f (patch) | |
| tree | 323dcb0334b6632a7652838d0eff7847caeb6107 /src/lib/ffmpeg_decoder.cc | |
| parent | 15a99109134e23ad9d660596fd2843143c0df699 (diff) | |
Somewhat speculative move to allow -ve seeks, which seem to be necessary for some files to seek correctly to 0.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 0e1588002..0f2c88fc9 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -296,9 +296,6 @@ FFmpegDecoder::seek (ContentTime time, bool accurate) ContentTime pre_roll = accurate ? ContentTime::from_seconds (2) : ContentTime (0); time -= pre_roll; - if (time < ContentTime (0)) { - time = ContentTime (0); - } /* XXX: it seems debatable whether PTS should be used here... http://www.mjbshaw.com/2012/04/seeking-in-ffmpeg-know-your-timestamp.html @@ -313,12 +310,6 @@ FFmpegDecoder::seek (ContentTime time, bool accurate) ); } - /* Ridiculous empirical hack */ - s--; - if (s < 0) { - s = 0; - } - av_seek_frame (_format_context, _video_stream, s, 0); avcodec_flush_buffers (video_codec_context()); |
