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

lavf/amr: Return AVERROR_EOF on EOF.

Fixes ticket #6280.
This commit is contained in:
Carl Eugen Hoyos 2017-03-31 06:54:01 +02:00
parent 0505a1d9c4
commit 76dd87c929

View File

@ -118,7 +118,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
AMRContext *amr = s->priv_data;
if (avio_feof(s->pb)) {
return AVERROR(EIO);
return AVERROR_EOF;
}
// FIXME this is wrong, this should rather be in an AVParser
@ -156,6 +156,8 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
if (read != size - 1) {
av_packet_unref(pkt);
if (read < 0)
return read;
return AVERROR(EIO);
}