diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-06 22:47:22 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-06 22:47:22 +0200 |
commit | d1ac6456369fecdc99044e69bb22130bbedc0558 (patch) | |
tree | af3374b2037931e6c37ababaedbc553d8432f824 /libavformat/act.c | |
parent | dccd1d2a581606f858e553b9f2a4e8aba1e460b7 (diff) |
avformat: Use ffio_read_size where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/act.c')
-rw-r--r-- | libavformat/act.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/act.c b/libavformat/act.c index 5688952a31..a369157647 100644 --- a/libavformat/act.c +++ b/libavformat/act.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "avio_internal.h" #include "riff.h" #include "internal.h" #include "libavcodec/get_bits.h" @@ -126,12 +127,10 @@ static int read_packet(AVFormatContext *s, if(s->streams[0]->codecpar->sample_rate==4400 && !ctx->second_packet) { - ret = avio_read(pb, ctx->audio_buffer, frame_size); + ret = ffio_read_size(pb, ctx->audio_buffer, frame_size); if(ret<0) return ret; - if(ret!=frame_size) - return AVERROR(EIO); pkt->data[0]=ctx->audio_buffer[11]; pkt->data[1]=ctx->audio_buffer[0]; @@ -165,12 +164,10 @@ static int read_packet(AVFormatContext *s, } else // 8000 Hz { - ret = avio_read(pb, ctx->audio_buffer, frame_size); + ret = ffio_read_size(pb, ctx->audio_buffer, frame_size); if(ret<0) return ret; - if(ret!=frame_size) - return AVERROR(EIO); pkt->data[0]=ctx->audio_buffer[5]; pkt->data[1]=ctx->audio_buffer[0]; |