[xcode] Fix for "Invalid return value 0 for stream protocol" log msg

Custom avio must not return 0, see https://patchwork.ffmpeg.org/project/ffmpeg/patch/20171025082258.32530-2-george@nsup.org/
This commit is contained in:
ejurgensen 2021-04-05 09:57:50 +02:00
parent cf05cd4963
commit 1fafab12e3

View File

@ -48,7 +48,8 @@ avio_evbuffer_read(void *opaque, uint8_t *buf, int size)
ret = evbuffer_remove(ae->evbuf, buf, size);
return ret;
// Must return AVERROR, see avio.h: avio_alloc_context()
return (ret > 0) ? ret : AVERROR_EOF;
}
static int