diff au.c @ 775:c5077fdab490 libavformat

AVPacket.pos
author michael
date Thu, 26 May 2005 20:17:12 +0000
parents d82ccc7cff1c
children feca73904e67
line wrap: on
line diff
--- a/au.c	Thu May 26 07:47:51 2005 +0000
+++ b/au.c	Thu May 26 20:17:12 2005 +0000
@@ -161,13 +161,11 @@
 
     if (url_feof(&s->pb))
         return AVERROR_IO;
-    if (av_new_packet(pkt, MAX_SIZE))
+    ret= av_get_packet(&s->pb, pkt, MAX_SIZE);
+    if (ret < 0)
         return AVERROR_IO;
     pkt->stream_index = 0;
 
-    ret = get_buffer(&s->pb, pkt->data, pkt->size);
-    if (ret < 0)
-        av_free_packet(pkt);
     /* note: we need to modify the packet size here to handle the last
        packet */
     pkt->size = ret;