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

Jan Sebechlebsky sebechlebskyjan at gmail.com
Thu Aug 18 23:07:34 EEST 2016


On 08/18/2016 09:05 PM, Moritz Barsnick wrote:

> 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?
>
Yes, that's right - thanks for noticing that. I'll fix that and also the 
issues above and resend the patch.

Regards,
Jan


More information about the ffmpeg-devel mailing list