static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack* track)

{

    offset_t pos = url_ftell(pb);

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

    put_tag(pb, "stbl");

    mov_write_stsd_tag(pb, track);

    mov_write_stts_tag(pb, track);

    if (track->enc->codec_type == CODEC_TYPE_VIDEO &&

        track->hasKeyframes < track->entry)

        mov_write_stss_tag(pb, track);

    if (track->enc->codec_type == CODEC_TYPE_VIDEO &&

        track->hasBframes)

        mov_write_ctts_tag(pb, track);

    mov_write_stsc_tag(pb, track);

    mov_write_stsz_tag(pb, track);

    mov_write_stco_tag(pb, track);

    return updateSize(pb, pos);

}

static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack* track)

{

    offset_t pos = url_ftell(pb);

    put_be32(pb, 0); 

    put_tag(pb, "stbl");

    mov_write_stsd_tag(pb, track);

    mov_write_stts_tag(pb, track);

    if (track->enc->codec_type == CODEC_TYPE_VIDEO &&

        track->hasKeyframes < track->entry)

        mov_write_stss_tag(pb, track);

    if (track->enc->codec_type == CODEC_TYPE_VIDEO &&

        track->hasBframes)

        mov_write_ctts_tag(pb, track);

    mov_write_stsc_tag(pb, track);

    mov_write_stsz_tag(pb, track);

    mov_write_stco_tag(pb, track);

    return updateSize(pb, pos);

}

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

{

    offset_t pos = url_ftell(VAR_0);

    put_be32(VAR_0, 0); 

    put_tag(VAR_0, "stbl");

    mov_write_stsd_tag(VAR_0, VAR_1);

    mov_write_stts_tag(VAR_0, VAR_1);

    if (VAR_1->enc->codec_type == CODEC_TYPE_VIDEO &&

        VAR_1->hasKeyframes < VAR_1->entry)

        mov_write_stss_tag(VAR_0, VAR_1);

    if (VAR_1->enc->codec_type == CODEC_TYPE_VIDEO &&

        VAR_1->hasBframes)

        mov_write_ctts_tag(VAR_0, VAR_1);

    mov_write_stsc_tag(VAR_0, VAR_1);

    mov_write_stsz_tag(VAR_0, VAR_1);

    mov_write_stco_tag(VAR_0, VAR_1);

    return updateSize(VAR_0, pos);

}

static int FUNC_0(ByteIOContext *VAR_0, MOVTrack* VAR_1)
{ offset_t pos = url_ftell(VAR_0); put_be32(VAR_0, 0); put_tag(VAR_0, "stbl"); mov_write_stsd_tag(VAR_0, VAR_1); mov_write_stts_tag(VAR_0, VAR_1); if (VAR_1->enc->codec_type == CODEC_TYPE_VIDEO &&
VAR_1->hasKeyframes < VAR_1->entry)
mov_write_stss_tag(VAR_0, VAR_1); if (VAR_1->enc->codec_type == CODEC_TYPE_VIDEO &&
VAR_1->hasBframes)
mov_write_ctts_tag(VAR_0, VAR_1); mov_write_stsc_tag(VAR_0, VAR_1); mov_write_stsz_tag(VAR_0, VAR_1); mov_write_stco_tag(VAR_0, VAR_1); return updateSize(VAR_0, pos); }