Skip to content

Commit

Permalink
accurate seeking is too slow. disable
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Mar 16, 2014
1 parent 386d230 commit c8919ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/AVDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ AVDemuxer::AVDemuxer(const QString& fileName, QObject *parent)
, _file_name(fileName)
, m_pQAVIO(0)
, mSeekUnit(SeekByTime)
, mSeekTarget(SeekTarget_AccurateFrame)
, mSeekTarget(SeekTarget_KeyFrame)
, mpDict(0)
{
mpInterrup = new InterruptHandler(this);
Expand Down Expand Up @@ -365,7 +365,10 @@ bool AVDemuxer::seek(qint64 pos)
* stream is selected, and timestamp is automatically converted
* from AV_TIME_BASE units to the stream specific time_base.
*/
int seek_flag = (backward ? AVSEEK_FLAG_BACKWARD : 0); //AVSEEK_FLAG_ANY
int seek_flag = (backward ? AVSEEK_FLAG_BACKWARD : 0);
if (mSeekTarget == SeekTarget_AnyFrame) {
seek_flag = AVSEEK_FLAG_ANY;
}
//bool seek_bytes = !!(format_context->iformat->flags & AVFMT_TS_DISCONT) && strcmp("ogg", format_context->iformat->name);
int ret = av_seek_frame(format_context, -1, upos, seek_flag);
//avformat_seek_file()
Expand Down

0 comments on commit c8919ba

Please sign in to comment.