summaryrefslogtreecommitdiff
path: root/libavformat/adp.c
diff options
context:
space:
mode:
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;