2011/5/28 Gil Pedersen <[email protected]>

> The current code assumes that the first sample has the earliest composition
> time. When using b-frames, a codec is not required to enforce this, and thus
> I make a quick search for the sample with the earliest composition time.
> ISO/IEC 14496-12 section 8.6.1.1 has an open GOP example that illustrates
> this. As far as I can tell this composition time is what needs to go into
> "media_time" for proper sync.
>

Do you wish to start presentation from incomplete samples such as
undecodable leading samples, which are samples that have earlier composition
time than the reference I-frame has, and depend on the earlier GOP deleted
from the stream?

I think incomplete samples shouldn't be in any edit, i.e. whole
presentation, and you should add more delay by sum of duration of these
incomplete samples and set composition time of the reference I-frame to
media_time of second edit entry.

So, I think it is enough for you to only set track->cluster[0].cts to
segment_duration of the first edit with timescale conversion and to
media_time of the second edit.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to