AVStream.first_discard_sample

If not 0, the first audio sample that should be discarded from the stream. This is broken by design (needs global sample count), but can't be avoided for broken by design formats such as mp3 with ad-hoc gapless audio support.

struct AVStream
int64_t first_discard_sample;

Meta