#include "avformat.h"
#include "internal.h"
-static int adp_probe(AVProbeData *p)
+static int adp_probe(const AVProbeData *p)
{
int i, changes = 0;
uint8_t last = 0;
return AVERROR_EOF;
ret = av_get_packet(s->pb, pkt, size);
+ if (ret < 0)
+ return ret;
- if (ret != size) {
- if (ret < 0) {
- av_packet_unref(pkt);
- return ret;
- }
- av_shrink_packet(pkt, ret);
- }
pkt->stream_index = 0;
return ret;