]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_latm.c
lavf: use designated initializers for AVClasses.
[ffmpeg] / libavformat / rtpdec_latm.c
index 255398df022a91ca4614f4c1ab547503c6302c22..bde34b7ab9633b3f1a7577f246da83711d0aba13 100644 (file)
@@ -2,20 +2,20 @@
  * RTP Depacketization of MP4A-LATM, RFC 3016
  * Copyright (c) 2010 Martin Storsjo
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -43,7 +43,7 @@ static void latm_free_context(PayloadContext *data)
         return;
     if (data->dyn_buf) {
         uint8_t *p;
-        url_close_dyn_buf(data->dyn_buf, &p);
+        avio_close_dyn_buf(data->dyn_buf, &p);
         av_free(p);
     }
     av_free(data->buf);
@@ -60,20 +60,20 @@ static int latm_parse_packet(AVFormatContext *ctx, PayloadContext *data,
         if (!data->dyn_buf || data->timestamp != *timestamp) {
             av_freep(&data->buf);
             if (data->dyn_buf)
-                url_close_dyn_buf(data->dyn_buf, &data->buf);
+                avio_close_dyn_buf(data->dyn_buf, &data->buf);
             data->dyn_buf = NULL;
             av_freep(&data->buf);
 
             data->timestamp = *timestamp;
-            if ((ret = url_open_dyn_buf(&data->dyn_buf)) < 0)
+            if ((ret = avio_open_dyn_buf(&data->dyn_buf)) < 0)
                 return ret;
         }
-        put_buffer(data->dyn_buf, buf, len);
+        avio_write(data->dyn_buf, buf, len);
 
         if (!(flags & RTP_FLAG_MARKER))
             return AVERROR(EAGAIN);
         av_free(data->buf);
-        data->len = url_close_dyn_buf(data->dyn_buf, &data->buf);
+        data->len = avio_close_dyn_buf(data->dyn_buf, &data->buf);
         data->dyn_buf = NULL;
         data->pos = 0;
     }
@@ -181,7 +181,7 @@ RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler = {
     .codec_type         = AVMEDIA_TYPE_AUDIO,
     .codec_id           = CODEC_ID_AAC,
     .parse_sdp_a_line   = latm_parse_sdp_line,
-    .open               = latm_new_context,
-    .close              = latm_free_context,
+    .alloc              = latm_new_context,
+    .free               = latm_free_context,
     .parse_packet       = latm_parse_packet
 };