[FFmpeg-devel] [Bounty] Impl. check if input h264 P/B frame ref's frame prior to last I

Hendrik Leppkes h.leppkes at gmail.com
Tue Feb 23 00:02:57 CET 2016


On Mon, Feb 22, 2016 at 11:40 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Andrey Utkin <andrey_utkin <at> fastmail.com> writes:
>
>> > Since valid, useful H264 streams with many ("safe") seek
>> > points but without I or IDR frames exist, the statement
>> > "only IDR frames are safe seek points" can't be true.
>>
>> What it takes on libavformat API application level
>> to figure out which non-I/non-IDR frame is safe to
>> seek onto?
>
> I may miss something but by default, seeking in H264
> streams (no matter if they contain IDR frames or not)
> with libavformat guarantees to provide a complete
> frame as first frame after seeking.
> There is an option to also show the corrupted frames.

avformat makes no such guarantees, avformat depends on the container
having appropriate keyframe hints.
avcodec will suppress any corrupted frames after decoding until
bitstream "recovery", which could be an IDR, intra refresh, or what
have you.

- Hendrik


More information about the ffmpeg-devel mailing list