On 6 March 2015 at 11:19, Zhang Rui <bbcal...@gmail.com> wrote: > if (!s->hd) > return AVERROR_EOF; > @@ -945,7 +949,19 @@ static int http_read_stream(URLContext *h, uint8_t > *buf, int size) > if (s->compressed) > return http_buf_read_compressed(h, buf, size); > #endif /* CONFIG_ZLIB */ > - return http_buf_read(h, buf, size); > + 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. > + 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? > + 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. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel