1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

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

View File

@ -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) {