static void close_slave(TeeSlave *tee_slave)

{

    AVFormatContext *avf;

    unsigned i;



    avf = tee_slave->avf;

    for (i = 0; i < avf->nb_streams; ++i) {

        AVBitStreamFilterContext *bsf_next, *bsf = tee_slave->bsfs[i];

        while (bsf) {

            bsf_next = bsf->next;

            av_bitstream_filter_close(bsf);

            bsf = bsf_next;

        }

    }

    av_freep(&tee_slave->stream_map);

    av_freep(&tee_slave->bsfs);



    ff_format_io_close(avf, &avf->pb);

    avformat_free_context(avf);

    tee_slave->avf = NULL;

}

static void close_slave(TeeSlave *tee_slave)

{

    AVFormatContext *avf;

    unsigned i;



    avf = tee_slave->avf;

    for (i = 0; i < avf->nb_streams; ++i) {

        AVBitStreamFilterContext *bsf_next, *bsf = tee_slave->bsfs[i];

        while (bsf) {

            bsf_next = bsf->next;

            av_bitstream_filter_close(bsf);

            bsf = bsf_next;

        }

    }

    av_freep(&tee_slave->stream_map);

    av_freep(&tee_slave->bsfs);



    ff_format_io_close(avf, &avf->pb);

    avformat_free_context(avf);

    tee_slave->avf = NULL;

}

static void close_slave(TeeSlave *tee_slave)     for (i = 0; i < avf->nb_streams; ++i) {         AVBitStreamFilterContext *bsf_next, *bsf = tee_slave->bsfs[i];         while (bsf) {             bsf_next = bsf->next;             av_bitstream_filter_close(bsf);             bsf = bsf_next;
static void FUNC_0(TeeSlave *VAR_0)

{

    AVFormatContext *avf;

    unsigned VAR_1;



    avf = VAR_0->avf;

    for (VAR_1 = 0; VAR_1 < avf->nb_streams; ++VAR_1) {

        AVBitStreamFilterContext *bsf_next, *bsf = VAR_0->bsfs[VAR_1];

        while (bsf) {

            bsf_next = bsf->next;

            av_bitstream_filter_close(bsf);

            bsf = bsf_next;

        }

    }

    av_freep(&VAR_0->stream_map);

    av_freep(&VAR_0->bsfs);



    ff_format_io_close(avf, &avf->pb);

    avformat_free_context(avf);

    VAR_0->avf = NULL;

}

static void FUNC_0(TeeSlave *VAR_0)
{ AVFormatContext *avf; unsigned VAR_1; avf = VAR_0->avf; for (VAR_1 = 0; VAR_1 < avf->nb_streams; ++VAR_1) { AVBitStreamFilterContext *bsf_next, *bsf = VAR_0->bsfs[VAR_1]; while (bsf) { bsf_next = bsf->next; av_bitstream_filter_close(bsf); bsf = bsf_next; } } av_freep(&VAR_0->stream_map); av_freep(&VAR_0->bsfs); ff_format_io_close(avf, &avf->pb); avformat_free_context(avf); VAR_0->avf = NULL; }