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

Jan Sebechlebsky sebechlebskyjan at gmail.com
Wed Apr 20 16:00:08 CEST 2016


Hi Nicolas,

On 04/20/2016 04:31 PM, Nicolas George wrote:
>
>   
> +static int tee_process_slave_failure(AVFormatContext *avf, unsigned slave_idx, int err_n)
> +{
> +    TeeContext *tee = avf->priv_data;
> +    TeeSlave *tee_slave = &tee->slaves[slave_idx];
> +
> +    tee->nb_alive--;
> +
> +    close_slave(tee_slave);
> +
> +    if (!tee->nb_alive) {
> +        av_log(avf, AV_LOG_ERROR, "All tee outputs failed.\n");
> +        return err_n;
> +    } else if (tee_slave->on_fail == ON_SLAVE_FAILURE_ABORT) {
> +        av_log(avf, AV_LOG_ERROR, "Slave muxer #%u failed, aborting.\n", slave_idx);
> +        return err_n;
> +    } else {
>> +        av_log(avf, AV_LOG_ERROR, "Slave muxer #%u failed, continuing with %u/%u slaves.\n",
>> +               slave_idx, tee->nb_alive, tee->nb_slaves);
> This is minor: it would probably be a good idea to print the error message
> here, since the error is being ignored afterwards.
>
I am not sure, I've understood this. If you meant the error of slave 
muxer, it should be already printed (since it is handled by slave muxer 
itself).
> Apart from the above comment, I see nothing wrong with the patch.
>
> Regards,
>
Regards,

Jan S.


More information about the ffmpeg-devel mailing list