[FFmpeg-trac] #1607(avformat:new): av_seek_frame() without AVSEEK_FLAG_ANY on mpg files returns success without seeking to a keyframe
FFmpeg
trac at avcodec.org
Sun Aug 5 18:11:49 CEST 2012
#1607: av_seek_frame() without AVSEEK_FLAG_ANY on mpg files returns success
without seeking to a keyframe
------------------------------------+------------------------------------
Reporter: mbradshaw | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by mbradshaw):
I think that's a good point. One option is to add custom seek code to mpg.
Another option is to add some new code to `ff_seek_frame_binary()` (which
is what I believe mpg defaults to using, judging by the code I'm reading).
`ff_seek_frame_binary()` could be changed so that if `AVSEEK_FLAG_ANY` is
not set, after it finds its frame, and if that frame is not a keyframe, it
reads backwards until it finds a keyframe. Otherwise, if `AVSEEK_FLAG_ANY`
is set it just returns the frame it finds.
Thoughts?
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1607#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list