lavf: return AVERROR_EOF rather than EIO on EOF

pull/389/head
Anton Khirnov 2 years ago
parent 2e61ae2cbe
commit 3f4c41839d
  1. 2
      libavformat/anm.c
  2. 2
      libavformat/dauddec.c
  3. 2
      libavformat/filmstripdec.c
  4. 2
      libavformat/idroqdec.c
  5. 3
      libavformat/sol.c
  6. 2
      libavformat/vc1test.c

@ -172,7 +172,7 @@ static int read_packet(AVFormatContext *s,
int tmp, record_size;
if (avio_feof(s->pb))
return AVERROR(EIO);
return AVERROR_EOF;
if (anm->page < 0)
return anm->page;

@ -41,7 +41,7 @@ static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
AVIOContext *pb = s->pb;
int ret, size;
if (avio_feof(pb))
return AVERROR(EIO);
return AVERROR_EOF;
size = avio_rb16(pb);
avio_rb16(pb); // unknown
ret = av_get_packet(pb, pkt, size);

@ -86,7 +86,7 @@ static int read_packet(AVFormatContext *s,
AVStream *st = s->streams[0];
if (avio_feof(s->pb))
return AVERROR(EIO);
return AVERROR_EOF;
pkt->dts = avio_tell(s->pb) / (st->codecpar->width * (int64_t)(st->codecpar->height + film->leading) * 4);
pkt->size = av_get_packet(s->pb, pkt, st->codecpar->width * st->codecpar->height * 4);
avio_skip(s->pb, st->codecpar->width * (int64_t) film->leading * 4);

@ -107,7 +107,7 @@ static int roq_read_packet(AVFormatContext *s,
while (!packet_read) {
if (avio_feof(s->pb))
return AVERROR(EIO);
return AVERROR_EOF;
/* get the next chunk preamble */
if ((ret = avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE)) !=

@ -127,7 +127,8 @@ static int sol_read_packet(AVFormatContext *s,
int ret;
if (avio_feof(s->pb))
return AVERROR(EIO);
return AVERROR_EOF;
ret= av_get_packet(s->pb, pkt, MAX_SIZE);
if (ret < 0)
return ret;

@ -101,7 +101,7 @@ static int vc1t_read_packet(AVFormatContext *s,
uint32_t pts;
if(avio_feof(pb))
return AVERROR(EIO);
return AVERROR_EOF;
frame_size = avio_rl24(pb);
if(avio_r8(pb) & 0x80)

Loading…
Cancel
Save