[FFmpeg-devel] [PATCH v11 01/11] avformat: Add fifo pseudo-muxer

Moritz Barsnick barsnick at gmx.net
Thu Aug 18 22:05:51 EEST 2016


On Thu, Aug 18, 2016 at 01:25:01 +0200, sebechlebskyjan at gmail.com wrote:
> + at item attempt_recovery @var{bool}
> +If failure occurs, attempt to recover the output. This is especially useful
> +when used with network output, allows to restart streaming transparently.
> +By default this option set to 0 (false).
                         ^ is

> +Sets maximum number of successive unsucessful recovery attempts after which
                                     ^ unsuccessful

> +Waiting time before the next recovery attempt after previous unsuccessfull
                                                                ^ unsuccessful

> +    if (ret < 0) {
> +        return ret;
> +    }

You can skip the curly brackets here.

> +static int fifo_write_header(AVFormatContext *avf)
> +{
> +    FifoContext * fifo = avf->priv_data;
> +    int ret;
> +
> +    ret = pthread_create(&fifo->writer_thread, NULL, fifo_consumer_thread, avf);
> +    if (ret) {
> +        av_log(avf, AV_LOG_ERROR, "Failed to start thread: %s\n",
> +               av_err2str(AVERROR(ret)));
> +        ret = AVERROR(ret);
> +    }
> +
> +    return 0;
> +}

You're re-assigning ret in the error case but not using it. I think you
meant to return it?

Moritz


More information about the ffmpeg-devel mailing list