]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/g723_1.c
mp3probe: Detect mp3 stronger with just 200 frames, this should speed up detection
[ffmpeg] / libavformat / g723_1.c
index 5bdd76436379daa054f2a174dbe4d0728a143716..09fd6141fc9455579e230448d357186a784319e7 100644 (file)
@@ -50,8 +50,8 @@ static int g723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
     int size, byte, ret;
 
-    pkt->pos = url_ftell(s->pb);
-    byte     = get_byte(s->pb);
+    pkt->pos = avio_tell(s->pb);
+    byte     = avio_r8(s->pb);
     size     = frame_size[byte & 3];
 
     ret = av_new_packet(pkt, size);
@@ -62,7 +62,7 @@ static int g723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
     pkt->duration     = 240;
     pkt->stream_index = 0;
 
-    ret = get_buffer(s->pb, pkt->data + 1, size - 1);
+    ret = avio_read(s->pb, pkt->data + 1, size - 1);
     if (ret < size - 1) {
         av_free_packet(pkt);
         return ret < 0 ? ret : AVERROR_EOF;