StreamDivergence

data class StreamDivergence(val streamIndex: Int, val field: DivergentField, val declared: String, val decoded: String)

A field where the container's declaration and the decoder's output disagree.

The container announces width, height, pixel format, sample rate, channels and sample format before a single packet is read, and every caller that sizes a surface, allocates a buffer or opens an audio device does it from those numbers. The decoder is free to produce something else, and files in the wild do exactly that: a mislabelled resolution in the track header, an audio stream tagged at the wrong rate. The result is a surface of the wrong size or a device opened for a rate nothing will feed it, with nothing anywhere saying why.

This library has no logger and no warning callback, on purpose. What it has is values read off the object afterwards, which is how corruptDataSkipped and unusedOpenOptions already report, and this joins them as MediaSource.streamDivergences.

Not an error. The file plays; the numbers to trust are the decoded ones.

Constructors

Link copied to clipboard
constructor(streamIndex: Int, field: DivergentField, declared: String, decoded: String)

Properties

Link copied to clipboard

What the container said, formatted for reading.

Link copied to clipboard

What the decoder actually produced.

Link copied to clipboard
Link copied to clipboard

One line, for a log or an assertion message.

Link copied to clipboard

The stream, by its index in the container.