static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx)
{
    char buffer[1024];
    int size;
    if (ctx->iframes) {
        ctx->p_per_gop = ctx->pframes / ctx->iframes;
        if (ctx->pframes % ctx->iframes)
            ctx->p_per_gop++;
        if (ctx->pframes)
            ctx->b_per_gop = ctx->bframes / ctx->pframes;
        if (ctx->p_per_gop > 9)
            ctx->p_per_gop = 9;
        if (ctx->b_per_gop > 9)
            ctx->b_per_gop = 9;
    }
    size = snprintf(buffer, 1024, "Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\n"
                    "Pix 0\nCf %d\nCg %d\nSl 7\nnl16 %d\nVi 1\nf1 1\n",
                    (float)ctx->codec->bit_rate, ctx->p_per_gop, ctx->b_per_gop,
                    ctx->codec->pix_fmt == PIX_FMT_YUV422P ? 2 : 1, ctx->first_gop_closed == 1,
                    ctx->codec->height / 16);
    put_byte(pb, TRACK_MPG_AUX);
    put_byte(pb, size + 1);
    put_buffer(pb, (uint8_t *)buffer, size + 1);
    return size + 3;
}
['static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx)\n{\n    char buffer[1024];\n    int size;\n    if (ctx->iframes) {\n        ctx->p_per_gop = ctx->pframes / ctx->iframes;\n        if (ctx->pframes % ctx->iframes)\n            ctx->p_per_gop++;\n        if (ctx->pframes)\n            ctx->b_per_gop = ctx->bframes / ctx->pframes;\n        if (ctx->p_per_gop > 9)\n            ctx->p_per_gop = 9;\n        if (ctx->b_per_gop > 9)\n            ctx->b_per_gop = 9;\n    }\n    size = snprintf(buffer, 1024, "Ver 1\\nBr %.6f\\nIpg 1\\nPpi %d\\nBpiop %d\\n"\n                    "Pix 0\\nCf %d\\nCg %d\\nSl 7\\nnl16 %d\\nVi 1\\nf1 1\\n",\n                    (float)ctx->codec->bit_rate, ctx->p_per_gop, ctx->b_per_gop,\n                    ctx->codec->pix_fmt == PIX_FMT_YUV422P ? 2 : 1, ctx->first_gop_closed == 1,\n                    ctx->codec->height / 16);\n    put_byte(pb, TRACK_MPG_AUX);\n    put_byte(pb, size + 1);\n    put_buffer(pb, (uint8_t *)buffer, size + 1);\n    return size + 3;\n}']