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
);
}
- /* Ridiculous empirical hack */
- s--;
- if (s < 0) {
- s = 0;
- }
-
av_seek_frame (_format_context, _video_stream, s, 0);
avcodec_flush_buffers (video_codec_context());