summaryrefslogtreecommitdiff
path: root/libavformat/img.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/img.c')
-rw-r--r--libavformat/img.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/img.c b/libavformat/img.c
index 468cb6e2f0..83c3c0691a 100644
--- a/libavformat/img.c
+++ b/libavformat/img.c
@@ -183,7 +183,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
url_fclose(f);
fail:
av_free(s);
- return -EIO;
+ return AVERROR_IO;
}
static int read_packet_alloc_cb(void *opaque, AVImageInfo *info)
@@ -211,14 +211,14 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
}
if (get_frame_filename(filename, sizeof(filename),
s->path, s->img_number) < 0)
- return -EIO;
+ return AVERROR_IO;
f = &f1;
if (url_fopen(f, filename, URL_RDONLY) < 0)
- return -EIO;
+ return AVERROR_IO;
} else {
f = &s1->pb;
if (url_feof(f))
- return -EIO;
+ return AVERROR_IO;
}
av_new_packet(pkt, s->img_size);
@@ -232,7 +232,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
if (ret < 0) {
av_free_packet(pkt);
- return -EIO; /* signal EOF */
+ return AVERROR_IO; /* signal EOF */
} else {
/* XXX: computing this pts is not necessary as it is done in
the generic code too */
@@ -318,10 +318,10 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt)
if (!img->is_pipe) {
if (get_frame_filename(filename, sizeof(filename),
img->path, img->img_number) < 0)
- return -EIO;
+ return AVERROR_IO;
pb = &pb1;
if (url_fopen(pb, filename, URL_WRONLY) < 0)
- return -EIO;
+ return AVERROR_IO;
} else {
pb = &s->pb;
}