Git Product home page Git Product logo

Comments (4)

qiudaomao avatar qiudaomao commented on July 30, 2024

从代码看,seek是直接用的AVSEEK_FLAG_BACKWARD。然后行为是向前跳转到最近的一个关键帧,和目标跳转进度差距会很大十秒都有可能。看起来只能改代码增加seek调整逻辑,从关键帧开始往后跳帧直到达到目标时间才开始正常播放
av_seek_frame(self->_format_context, -1, ts, AVSEEK_FLAG_BACKWARD);

from sgplayer.

ZhouYing-bit avatar ZhouYing-bit commented on July 30, 2024

@qiudaomao 你好,我也发现了这个问题,你能提交pull request

from sgplayer.

qiudaomao avatar qiudaomao commented on July 30, 2024

@qiudaomao 你好,我也发现了这个问题,你能提交pull request

这个改动太大了,难度太高,我已经转mpv或者IJKPlayer了,mpv项目更活跃

from sgplayer.

ZhouYing-bit avatar ZhouYing-bit commented on July 30, 2024

我查看了源码后发现,这个效果其实是作者专门对ffmpeg的seek做了保护控制,如果你不想要可以在SGGLViewController.m中注释掉336到344行的seek time计算方法; 如果还是不能满足你的需求的话就搜索av_seek_frame函数的调用,将AVSEEK_FLAG_BACKWARD修改为AVSEEK_FLAG_ANY,但是这样seek可能会出现花屏。 @qiudaomao @guzhike2012

from sgplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.