[FFmpeg-devel] [PATCH v8 3/3][GSOC] avformat/tee: Handling slave failure in tee muxer

Marton Balint cus at passwd.hu
Sun Apr 17 22:59:33 CEST 2016



On Sun, 17 Apr 2016, sebechlebskyjan at gmail.com wrote:

> From: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
>
> Adds per slave option 'onfail' to the tee muxer allowing an output to
> fail,so other slave outputs can continue.
>

[..]

> static int tee_write_trailer(AVFormatContext *avf)
> {
>     TeeContext *tee = avf->priv_data;
> +    AVFormatContext *avf2;
>     int ret_all = 0, ret;
>     unsigned i;
>
>     for (i = 0; i < tee->nb_slaves; i++) {
> -        if ((ret = close_slave(&tee->slaves[i])) < 0)
> -            if (!ret_all)
> +        if (!(avf2 = tee->slaves[i].avf))
> +            continue;

This might be uneeded, close_slave should handle a null avf.

> +        if ((ret = close_slave(&tee->slaves[i])) < 0) {
> +            ret = tee_process_slave_failure(avf2, i, ret);

This supposed to be tee_process_slave_failuer(avf, i, ret)?

I missed these earlier, sorry.

Regards,
Marton


More information about the ffmpeg-devel mailing list