Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2017-10-27 21:46:29 +0300
committerJan Ekström <jeebjp@gmail.com>2017-10-29 20:40:52 +0300
commit158a79c31d55d0b82ff3f514c586f5be033ad0c2 (patch)
treed248b8e38a1b6990726c24694164569414702134 /libavformat/aviobuf.c
parenta606f27f4c610708fa96e35eed7b7537d3d8f712 (diff)
lavf/aviobuf: return EINVAL when reading from a write-only context.
Signed-off-by: Nicolas George <george@nsup.org>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index bfd40f5097..3b4c8439d6 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -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) {