static int mov_write_udta_tag(ByteIOContext *pb, MOVContext* mov,

                              AVFormatContext *s)

{

    int pos = url_ftell(pb);

    int i;



    put_be32(pb, 0); /* size */

    put_tag(pb, "udta");



    /* iTunes meta data */

    mov_write_meta_tag(pb, mov, s);



    /* Requirements */

    for (i=0; i<MAX_STREAMS; i++) {

        if(mov->tracks[i].entry <= 0) continue;

        if (mov->tracks[i].enc->codec_id == CODEC_ID_AAC ||

            mov->tracks[i].enc->codec_id == CODEC_ID_MPEG4) {

            int pos = url_ftell(pb);

            put_be32(pb, 0); /* size */

            put_tag(pb, "\251req");

            put_be16(pb, sizeof("QuickTime 6.0 or greater") - 1);

            put_be16(pb, 0);

            put_buffer(pb, "QuickTime 6.0 or greater",

                       sizeof("QuickTime 6.0 or greater") - 1);

            updateSize(pb, pos);

            break;

        }

    }



    /* Encoder */

    if(!(mov->tracks[0].enc->flags & CODEC_FLAG_BITEXACT))

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); /* size */

        put_tag(pb, "\251enc");

        put_be16(pb, sizeof(LIBAVFORMAT_IDENT) - 1); /* string length */

        put_be16(pb, 0);

        put_buffer(pb, LIBAVFORMAT_IDENT, sizeof(LIBAVFORMAT_IDENT) - 1);

        updateSize(pb, pos);

    }



    if( s->title[0] )

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); /* size */

        put_tag(pb, "\251nam");

        put_be16(pb, strlen(s->title)); /* string length */

        put_be16(pb, 0);

        put_buffer(pb, s->title, strlen(s->title));

        updateSize(pb, pos);

    }



    if( s->author[0] )

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); /* size */

        put_tag(pb, /*"\251aut"*/ "\251day" );

        put_be16(pb, strlen(s->author)); /* string length */

        put_be16(pb, 0);

        put_buffer(pb, s->author, strlen(s->author));

        updateSize(pb, pos);

    }



    if( s->comment[0] )

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); /* size */

        put_tag(pb, "\251des");

        put_be16(pb, strlen(s->comment)); /* string length */

        put_be16(pb, 0);

        put_buffer(pb, s->comment, strlen(s->comment));

        updateSize(pb, pos);

    }



    return updateSize(pb, pos);

}

static int mov_write_udta_tag(ByteIOContext *pb, MOVContext* mov,

                              AVFormatContext *s)

{

    int pos = url_ftell(pb);

    int i;



    put_be32(pb, 0); 

    put_tag(pb, "udta");



    

    mov_write_meta_tag(pb, mov, s);



    

    for (i=0; i<MAX_STREAMS; i++) {

        if(mov->tracks[i].entry <= 0) continue;

        if (mov->tracks[i].enc->codec_id == CODEC_ID_AAC ||

            mov->tracks[i].enc->codec_id == CODEC_ID_MPEG4) {

            int pos = url_ftell(pb);

            put_be32(pb, 0); 

            put_tag(pb, "\251req");

            put_be16(pb, sizeof("QuickTime 6.0 or greater") - 1);

            put_be16(pb, 0);

            put_buffer(pb, "QuickTime 6.0 or greater",

                       sizeof("QuickTime 6.0 or greater") - 1);

            updateSize(pb, pos);

            break;

        }

    }



    

    if(!(mov->tracks[0].enc->flags & CODEC_FLAG_BITEXACT))

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); 

        put_tag(pb, "\251enc");

        put_be16(pb, sizeof(LIBAVFORMAT_IDENT) - 1); 

        put_be16(pb, 0);

        put_buffer(pb, LIBAVFORMAT_IDENT, sizeof(LIBAVFORMAT_IDENT) - 1);

        updateSize(pb, pos);

    }



    if( s->title[0] )

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); 

        put_tag(pb, "\251nam");

        put_be16(pb, strlen(s->title)); 

        put_be16(pb, 0);

        put_buffer(pb, s->title, strlen(s->title));

        updateSize(pb, pos);

    }



    if( s->author[0] )

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); 

        put_tag(pb,  "\251day" );

        put_be16(pb, strlen(s->author)); 

        put_be16(pb, 0);

        put_buffer(pb, s->author, strlen(s->author));

        updateSize(pb, pos);

    }



    if( s->comment[0] )

    {

        int pos = url_ftell(pb);

        put_be32(pb, 0); 

        put_tag(pb, "\251des");

        put_be16(pb, strlen(s->comment)); 

        put_be16(pb, 0);

        put_buffer(pb, s->comment, strlen(s->comment));

        updateSize(pb, pos);

    }



    return updateSize(pb, pos);

}

    if(!(mov->tracks[0].enc->flags & CODEC_FLAG_BITEXACT))
static int FUNC_0(ByteIOContext *VAR_0, MOVContext* VAR_1,

                              AVFormatContext *VAR_2)

{

    int VAR_5 = url_ftell(VAR_0);

    int VAR_4;



    put_be32(VAR_0, 0); 

    put_tag(VAR_0, "udta");



    

    mov_write_meta_tag(VAR_0, VAR_1, VAR_2);



    

    for (VAR_4=0; VAR_4<MAX_STREAMS; VAR_4++) {

        if(VAR_1->tracks[VAR_4].entry <= 0) continue;

        if (VAR_1->tracks[VAR_4].enc->codec_id == CODEC_ID_AAC ||

            VAR_1->tracks[VAR_4].enc->codec_id == CODEC_ID_MPEG4) {

            int VAR_5 = url_ftell(VAR_0);

            put_be32(VAR_0, 0); 

            put_tag(VAR_0, "\251req");

            put_be16(VAR_0, sizeof("QuickTime 6.0 or greater") - 1);

            put_be16(VAR_0, 0);

            put_buffer(VAR_0, "QuickTime 6.0 or greater",

                       sizeof("QuickTime 6.0 or greater") - 1);

            updateSize(VAR_0, VAR_5);

            break;

        }

    }



    

    if(!(VAR_1->tracks[0].enc->flags & CODEC_FLAG_BITEXACT))

    {

        int VAR_5 = url_ftell(VAR_0);

        put_be32(VAR_0, 0); 

        put_tag(VAR_0, "\251enc");

        put_be16(VAR_0, sizeof(LIBAVFORMAT_IDENT) - 1); 

        put_be16(VAR_0, 0);

        put_buffer(VAR_0, LIBAVFORMAT_IDENT, sizeof(LIBAVFORMAT_IDENT) - 1);

        updateSize(VAR_0, VAR_5);

    }



    if( VAR_2->title[0] )

    {

        int VAR_5 = url_ftell(VAR_0);

        put_be32(VAR_0, 0); 

        put_tag(VAR_0, "\251nam");

        put_be16(VAR_0, strlen(VAR_2->title)); 

        put_be16(VAR_0, 0);

        put_buffer(VAR_0, VAR_2->title, strlen(VAR_2->title));

        updateSize(VAR_0, VAR_5);

    }



    if( VAR_2->author[0] )

    {

        int VAR_5 = url_ftell(VAR_0);

        put_be32(VAR_0, 0); 

        put_tag(VAR_0,  "\251day" );

        put_be16(VAR_0, strlen(VAR_2->author)); 

        put_be16(VAR_0, 0);

        put_buffer(VAR_0, VAR_2->author, strlen(VAR_2->author));

        updateSize(VAR_0, VAR_5);

    }



    if( VAR_2->comment[0] )

    {

        int VAR_5 = url_ftell(VAR_0);

        put_be32(VAR_0, 0); 

        put_tag(VAR_0, "\251des");

        put_be16(VAR_0, strlen(VAR_2->comment)); 

        put_be16(VAR_0, 0);

        put_buffer(VAR_0, VAR_2->comment, strlen(VAR_2->comment));

        updateSize(VAR_0, VAR_5);

    }



    return updateSize(VAR_0, VAR_5);

}

static int FUNC_0(ByteIOContext *VAR_0, MOVContext* VAR_1,
AVFormatContext *VAR_2)
{ int VAR_5 = url_ftell(VAR_0); int VAR_4; put_be32(VAR_0, 0); put_tag(VAR_0, "udta"); mov_write_meta_tag(VAR_0, VAR_1, VAR_2); for (VAR_4=0; VAR_4<MAX_STREAMS; VAR_4++) { if(VAR_1->tracks[VAR_4].entry <= 0) continue; if (VAR_1->tracks[VAR_4].enc->codec_id == CODEC_ID_AAC ||
VAR_1->tracks[VAR_4].enc->codec_id == CODEC_ID_MPEG4) { int VAR_5 = url_ftell(VAR_0); put_be32(VAR_0, 0); put_tag(VAR_0, "\251req"); put_be16(VAR_0, sizeof("QuickTime 6.0 or greater") - 1); put_be16(VAR_0, 0); put_buffer(VAR_0, "QuickTime 6.0 or greater",
sizeof("QuickTime 6.0 or greater") - 1); updateSize(VAR_0, VAR_5); break; } } if(!(VAR_1->tracks[0].enc->flags & CODEC_FLAG_BITEXACT))
{ int VAR_5 = url_ftell(VAR_0); put_be32(VAR_0, 0); put_tag(VAR_0, "\251enc"); put_be16(VAR_0, sizeof(LIBAVFORMAT_IDENT) - 1); put_be16(VAR_0, 0); put_buffer(VAR_0, LIBAVFORMAT_IDENT, sizeof(LIBAVFORMAT_IDENT) - 1); updateSize(VAR_0, VAR_5); } if( VAR_2->title[0] )
{ int VAR_5 = url_ftell(VAR_0); put_be32(VAR_0, 0); put_tag(VAR_0, "\251nam"); put_be16(VAR_0, strlen(VAR_2->title)); put_be16(VAR_0, 0); put_buffer(VAR_0, VAR_2->title, strlen(VAR_2->title)); updateSize(VAR_0, VAR_5); } if( VAR_2->author[0] )
{ int VAR_5 = url_ftell(VAR_0); put_be32(VAR_0, 0); put_tag(VAR_0,  "\251day" ); put_be16(VAR_0, strlen(VAR_2->author)); put_be16(VAR_0, 0); put_buffer(VAR_0, VAR_2->author, strlen(VAR_2->author)); updateSize(VAR_0, VAR_5); } if( VAR_2->comment[0] )
{ int VAR_5 = url_ftell(VAR_0); put_be32(VAR_0, 0); put_tag(VAR_0, "\251des"); put_be16(VAR_0, strlen(VAR_2->comment)); put_be16(VAR_0, 0); put_buffer(VAR_0, VAR_2->comment, strlen(VAR_2->comment)); updateSize(VAR_0, VAR_5); } return updateSize(VAR_0, VAR_5); }