On Wed, Oct 25, 2017 at 11:22 AM, Nicolas George <geo...@nsup.org> wrote:
> +static int read_packet_wrapper(AVIOContext *s, uint8_t *buf, int size)
> +{
> +    int ret;
> +
> +    if (!s->read_packet)
> +        return AVERROR_EOF;
> +    ret = s->read_packet(s->opaque, buf, size);
> +#if FF_API_OLD_AVIO_EOF_0
> +    if (!ret && !s->max_packet_size) {
> +        av_log(s, AV_LOG_WARNING, "Invalid return value 0 for stream 
> protocol\n");
> +        ret = AVERROR_EOF;
> +    }
> +#else
> +    av_assert2(ret || s->max_packet_size);
> +#endif
> +    return ret;
> +}
> +

Built and tested locally and the effect seems to be the one wished,
although it seems like it is complaining about the AVClass being
nullptr? Is this something inherent to custom AVIO contexts and it's
the client that's supposed to fix this? Log follows:

> [ffmpeg] av_log callback called with bad parameters (NULL AVClass).
> [ffmpeg] This is a bug in one of Libav/FFmpeg libraries used.
> [ffmpeg] Invalid return value 0 for stream protocol


Jan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to