2014-06-27 2:16 GMT+09:00 Vittorio Giovara <vittorio.giov...@gmail.com>:

> On Wed, Jun 25, 2014 at 8:31 AM, Hendrik Leppkes <h.lepp...@gmail.com>
> wrote:
> > Setting key frame based on them is the most logical choice, really.
>
> My point was more that it's really hard to tell what key_frame does
> since its documentation is just "1 -> keyframe, 0 -> not".
> Have you got any pointers that would improve it by chance?
> Thanks.
> --
> Vittorio
> _______________________________________________
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel
>

What libavcodec's H.264 decoder and parser do is marking an IDR-picture or
a picture with recovery point SEI as a keyframe.
However, those pictures themselves do not always guarantee that decoding
from there gives correct output i.e. no errors.
At least, correct decoding requires corresponding parameter sets for them.
So, according to what libavcodec does so far, 'keyframe' is defined as a
frame which has hint to get correct output.
The 'keyframe' parameter itself has no hint other than that though.
For instance, an IDR-picture has the hint that you'll get correct output by
decoding 0 pictures from there with corresponding parameter sets.

It's too bad that 'keyframe' is not always useful for seek because of that
and libavformat uses such 'keyframe' to seek without returning other hints.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to