You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	lavf: return AVERROR_EOF rather than EIO on EOF
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user