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

lavf/aviobuf: return EINVAL when reading from a write-only context.

Signed-off-by: 's avatarNicolas George <george@nsup.org>
parent a606f27f
......@@ -529,7 +529,7 @@ static int read_packet_wrapper(AVIOContext *s, uint8_t *buf, int size)
int ret;
if (!s->read_packet)
return AVERROR_EOF;
return AVERROR(EINVAL);
ret = s->read_packet(s->opaque, buf, size);
#if FF_API_OLD_AVIO_EOF_0
if (!ret && !s->max_packet_size) {
......
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