Commit bfb1a946 authored by Nicolas George's avatar Nicolas George Committed by Jan Ekström

examples/avio_reading: return AVERROR_EOF at EOF.

Signed-off-by: 's avatarNicolas George <george@nsup.org>
parent f80224ed
...@@ -44,6 +44,8 @@ static int read_packet(void *opaque, uint8_t *buf, int buf_size) ...@@ -44,6 +44,8 @@ static int read_packet(void *opaque, uint8_t *buf, int buf_size)
struct buffer_data *bd = (struct buffer_data *)opaque; struct buffer_data *bd = (struct buffer_data *)opaque;
buf_size = FFMIN(buf_size, bd->size); buf_size = FFMIN(buf_size, bd->size);
if (!buf_size)
return AVERROR_EOF;
printf("ptr:%p size:%zu\n", bd->ptr, bd->size); printf("ptr:%p size:%zu\n", bd->ptr, bd->size);
/* copy internal buffer data to buf */ /* copy internal buffer data to buf */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment