[FFmpeg-devel] [PATCH] spdifenc: fix byte order on big-endian systems

Janne Grunau janne-ffmpeg
Sun Feb 13 15:17:34 CET 2011

On Sat, Feb 12, 2011 at 03:57:01PM +0200, Anssi Hannula wrote:
> There is a check for HAVE_BIGENDIAN when outputting the IEC 61937
> stream. On big-endian systems the payload data is not byteswapped,
> causing in effect the outputted payload data to be in a different byte
> order on big-endian than on little-endian systems.
> However, the IEC 61937 preamble (and the final odd byte if present) is
> always outputted in the same byte order. This means that on big-endian
> systems the headers have a different byte order than the payload,
> preventing useful use of the output.
> Fix that by outputting the data in a format suitable for sending to an
> audio device in S16LE format by default. Output as big-endian (S16BE)
> is added as an AVOption. This makes the muxer output the same on all
> archs by default.
> ---
> Adapted according to Janne's comments. Applies cleanly only after the
> DTS-HD one.

thanks, queued


More information about the ffmpeg-devel mailing list