提交 bfb1a946 编写于 作者: N Nicolas George 提交者: Jan Ekström

examples/avio_reading: return AVERROR_EOF at EOF.

Signed-off-by: NNicolas George <george@nsup.org>
上级 f80224ed
......@@ -44,6 +44,8 @@ static int read_packet(void *opaque, uint8_t *buf, int buf_size)
struct buffer_data *bd = (struct buffer_data *)opaque;
buf_size = FFMIN(buf_size, bd->size);
if (!buf_size)
return AVERROR_EOF;
printf("ptr:%p size:%zu\n", bd->ptr, bd->size);
/* copy internal buffer data to buf */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册