static int mpegts_audio_write(void *opaque, uint8_t *buf, int size)

{

    MpegTSWriteStream *ts_st = (MpegTSWriteStream *)opaque;

    if (ts_st->adata_pos + size > ts_st->adata_size)

        return AVERROR(EIO);



    memcpy(ts_st->adata + ts_st->adata_pos, buf, size);

    ts_st->adata_pos += size;



    return 0;

}

static int mpegts_audio_write(void *opaque, uint8_t *buf, int size)

{

    MpegTSWriteStream *ts_st = (MpegTSWriteStream *)opaque;

    if (ts_st->adata_pos + size > ts_st->adata_size)

        return AVERROR(EIO);



    memcpy(ts_st->adata + ts_st->adata_pos, buf, size);

    ts_st->adata_pos += size;



    return 0;

}

    if (ts_st->adata_pos + size > ts_st->adata_size)
static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int VAR_2)

{

    MpegTSWriteStream *ts_st = (MpegTSWriteStream *)VAR_0;

    if (ts_st->adata_pos + VAR_2 > ts_st->adata_size)

        return AVERROR(EIO);



    memcpy(ts_st->adata + ts_st->adata_pos, VAR_1, VAR_2);

    ts_st->adata_pos += VAR_2;



    return 0;

}

static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int VAR_2)
{ MpegTSWriteStream *ts_st = (MpegTSWriteStream *)VAR_0; if (ts_st->adata_pos + VAR_2 > ts_st->adata_size)
return AVERROR(EIO); memcpy(ts_st->adata + ts_st->adata_pos, VAR_1, VAR_2); ts_st->adata_pos += VAR_2; return 0; }