[FFmpeg-devel] [PATCH] movenc: byteswap codec_tag in mov_write_ms_tag
Måns Rullgård
mans
Thu Jan 27 17:50:22 CET 2011
Janne Grunau <janne-ffmpeg at jannau.net> writes:
> based on Alex Converse's "Fix ADPCM MS in mov muxing" patch
> ---
> libavformat/movenc.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 6061701..1279853 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -318,8 +318,8 @@ static int mov_write_ms_tag(ByteIOContext *pb, MOVTrack *track)
> {
> int64_t pos = url_ftell(pb);
> put_be32(pb, 0);
> - put_le32(pb, track->tag);
> - track->enc->codec_tag = track->tag >> 16;
> + put_le32(pb, track->tag); // store it byteswapped
> + track->enc->codec_tag = ((track->tag >> 8) & 0xFF00) + ((track->tag >> 24) & 0xFF);
> ff_put_wav_header(pb, track->enc);
> return updateSize(pb, pos);
> }
There is a newer version of that patch in the same thread.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list