diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-02-03 08:19:39 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-06 22:49:26 +0200 |
commit | a3e78deb0a3a0142d333808678b6ee70873ecab7 (patch) | |
tree | cec3963044daf0438c05e83647b71e635214023a | |
parent | d1ac6456369fecdc99044e69bb22130bbedc0558 (diff) | |
download | ffmpeg-a3e78deb0a3a0142d333808678b6ee70873ecab7.tar.gz |
avformat/ilbc: Use av_get_packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/ilbc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/ilbc.c b/libavformat/ilbc.c index efa5339089..0cbdd3d5b8 100644 --- a/libavformat/ilbc.c +++ b/libavformat/ilbc.c @@ -99,15 +99,11 @@ static int ilbc_read_packet(AVFormatContext *s, AVCodecParameters *par = s->streams[0]->codecpar; int ret; - if ((ret = av_new_packet(pkt, par->block_align)) < 0) - return ret; + if ((ret = av_get_packet(s->pb, pkt, par->block_align)) != par->block_align) + return ret < 0 ? ret : AVERROR_INVALIDDATA; pkt->stream_index = 0; - pkt->pos = avio_tell(s->pb); pkt->duration = par->block_align == 38 ? 160 : 240; - if ((ret = avio_read(s->pb, pkt->data, par->block_align)) != par->block_align) { - return ret < 0 ? ret : AVERROR(EIO); - } return 0; } |