mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
examples/avio_reading: return AVERROR_EOF at EOF.
Signed-off-by: Nicolas George <george@nsup.org>
This commit is contained in:
parent
f80224ed19
commit
bfb1a94625
@ -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 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user