examples/avio_reading: return AVERROR_EOF at EOF.

Signed-off-by: Nicolas George <george@nsup.org>
This commit is contained in:
Nicolas George 2017-10-27 20:46:27 +02:00 committed by Jan Ekström
parent f80224ed19
commit bfb1a94625

View File

@ -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 */