static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track)

{

    int64_t pos = avio_tell(pb);

    avio_wb32(pb, 0);

    avio_wl32(pb, track->tag); // store it byteswapped

    track->enc->codec_tag = av_bswap16(track->tag >> 16);

    ff_put_wav_header(pb, track->enc, 0);

    return update_size(pb, pos);

}

static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track)

{

    int64_t pos = avio_tell(pb);

    avio_wb32(pb, 0);

    avio_wl32(pb, track->tag); 

    track->enc->codec_tag = av_bswap16(track->tag >> 16);

    ff_put_wav_header(pb, track->enc, 0);

    return update_size(pb, pos);

}

static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)

{

    int64_t pos = avio_tell(VAR_0);

    avio_wb32(VAR_0, 0);

    avio_wl32(VAR_0, VAR_1->tag); 

    VAR_1->enc->codec_tag = av_bswap16(VAR_1->tag >> 16);

    ff_put_wav_header(VAR_0, VAR_1->enc, 0);

    return update_size(VAR_0, pos);

}

static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)
{ int64_t pos = avio_tell(VAR_0); avio_wb32(VAR_0, 0); avio_wl32(VAR_0, VAR_1->tag); VAR_1->enc->codec_tag = av_bswap16(VAR_1->tag >> 16); ff_put_wav_header(VAR_0, VAR_1->enc, 0); return update_size(VAR_0, pos); }