diff options
author | Nicolas George <george@nsup.org> | 2017-10-27 20:46:27 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2017-10-29 19:40:52 +0200 |
commit | bfb1a946255f9b12dccc6b12f5a865852f487a87 (patch) | |
tree | 34b51603a28ace910a2be12cdfb0f91d46caddf2 /doc | |
parent | f80224ed19a4c012549fd460d529c7c04e68cf21 (diff) | |
download | ffmpeg-bfb1a946255f9b12dccc6b12f5a865852f487a87.tar.gz |
examples/avio_reading: return AVERROR_EOF at EOF.
Signed-off-by: Nicolas George <george@nsup.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/avio_reading.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/examples/avio_reading.c b/doc/examples/avio_reading.c index 02474e907a..7860fd5e2f 100644 --- a/doc/examples/avio_reading.c +++ b/doc/examples/avio_reading.c @@ -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 */ |