static int pulse_write_packet(AVFormatContext *h, AVPacket *pkt)

{

    PulseData *s = h->priv_data;

    int size     = pkt->size;

    uint8_t *buf = pkt->data;

    int error;



    if (s->stream_index != pkt->stream_index)

        return 0;



    if ((error = pa_simple_write(s->pa, buf, size, &error))) {

        av_log(s, AV_LOG_ERROR, "pa_simple_write failed: %s\n", pa_strerror(error));

        return AVERROR(EIO);

    }



    return 0;

}

static int pulse_write_packet(AVFormatContext *h, AVPacket *pkt)

{

    PulseData *s = h->priv_data;

    int size     = pkt->size;

    uint8_t *buf = pkt->data;

    int error;



    if (s->stream_index != pkt->stream_index)

        return 0;



    if ((error = pa_simple_write(s->pa, buf, size, &error))) {

        av_log(s, AV_LOG_ERROR, "pa_simple_write failed: %s\n", pa_strerror(error));

        return AVERROR(EIO);

    }



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)

{

    PulseData *s = VAR_0->priv_data;

    int VAR_2     = VAR_1->VAR_2;

    uint8_t *buf = VAR_1->data;

    int VAR_3;



    if (s->stream_index != VAR_1->stream_index)

        return 0;



    if ((VAR_3 = pa_simple_write(s->pa, buf, VAR_2, &VAR_3))) {

        av_log(s, AV_LOG_ERROR, "pa_simple_write failed: %s\n", pa_strerror(VAR_3));

        return AVERROR(EIO);

    }



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{ PulseData *s = VAR_0->priv_data; int VAR_2     = VAR_1->VAR_2; uint8_t *buf = VAR_1->data; int VAR_3; if (s->stream_index != VAR_1->stream_index)
return 0; if ((VAR_3 = pa_simple_write(s->pa, buf, VAR_2, &VAR_3))) { av_log(s, AV_LOG_ERROR, "pa_simple_write failed: %s\n", pa_strerror(VAR_3)); return AVERROR(EIO); } return 0; }