[FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

Zhang Rui bbcallen at gmail.com
Mon Mar 9 03:52:39 CET 2015


>> +    read_ret = http_buf_read(h, buf, size);
>> +    if (s->reconnect && s->filesize > 0 && s->off < s->filesize &&
>> read_ret < 0) {
>>
>
> minor: you can chek read_ret < 0 first, this condition usually will net be
> meet.

Fine, I'll fix.

>> +        av_log(h, AV_LOG_WARNING, "Will reconnect at %"PRId64".\n",
>> s->off);
>>
>
> Not sure this should be a warning. maybe info, debug or verbose?

In my opinion, it's already a bad condition should be noticed,
if it has run into reconnection. Anyhow, info is OK for me.

>> +        seek_ret = http_seek_internal(h, s->off, SEEK_SET, 1);
>> +        if (seek_ret != s->off) {
>> +            av_log(h, AV_LOG_WARNING, "Failed to reconnect at
>> %"PRId64".\n", s->off);
>>
>
> This should be an error I think.

Yes, I'll fix.

Thanks for your review.


More information about the ffmpeg-devel mailing list