]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/adp.c
avcodec: postpone removal of deprecated libopenh264 wrapper options
[ffmpeg] / libavformat / adp.c
index 3914857ad53a070093f0db5e23cc1c155e705bc9..b0ee09753e48165512600d3a504038fc79c0ab5b 100644 (file)
@@ -24,7 +24,7 @@
 #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;
@@ -75,14 +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) {
-            av_packet_unref(pkt);
-            return ret;
-        }
-        av_shrink_packet(pkt, ret);
-    }
     pkt->stream_index = 0;
 
     return ret;