summaryrefslogtreecommitdiff
path: root/libavformat/adp.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-12 09:23:46 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-12 17:13:10 +0100
commitd025a5bcc271387e2f3080b88651eddbae9b93d2 (patch)
tree04681e2dfdbdb55af8256a1ea3cbb4a2951caa13 /libavformat/adp.c
parent51367267c8a9f1a840f5e810f8c788e6e03712a5 (diff)
downloadffmpeg-d025a5bcc271387e2f3080b88651eddbae9b93d2.tar.gz
avformat/adp, svs: Remove redundant av_shrink_packet()
av_get_packet() already makes sure that the packet size is accurate and that the packet data is zero-padded even when one could not read as much as desired. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/adp.c')
-rw-r--r--libavformat/adp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/adp.c b/libavformat/adp.c
index 8668c78fe4..b0ee09753e 100644
--- a/libavformat/adp.c
+++ b/libavformat/adp.c
@@ -75,13 +75,9 @@ static int adp_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR_EOF;
ret = av_get_packet(s->pb, pkt, size);
+ if (ret < 0)
+ return ret;
- if (ret != size) {
- if (ret < 0) {
- return ret;
- }
- av_shrink_packet(pkt, ret);
- }
pkt->stream_index = 0;
return ret;