[Libav-user] pts < dts error

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Oct 13 12:17:49 CEST 2015

YIRAN LI <mrfun.china at ...> writes:

> And does this mean, for any encoders that can 
> generate B frames, I need to do similar 
> pre-processing before calling av_write_frame()?

No, only for encoders that produce broken pts/dts.

> So if I don't know possible max B frames, then I 
> can't use av_write_frame to correctly mux?

You set max_bframes when you init the encoder.

Feel free to subtract 1 from dts as an alternative.

Carl Eugen

More information about the Libav-user mailing list