]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_qcelp.c
avformat: map T.140 RTP codec to text
[ffmpeg] / libavformat / rtpdec_qcelp.c
index f2893499d55939d792a9423e52af7e8d59a3b573..41cc8263dfc9097ae0d4999a9a7ebd000d791f59 100644 (file)
@@ -47,16 +47,6 @@ struct PayloadContext {
     uint32_t next_timestamp;
 };
 
-static PayloadContext *qcelp_new_context(void)
-{
-    return av_mallocz(sizeof(PayloadContext));
-}
-
-static void qcelp_free_context(PayloadContext *data)
-{
-    av_free(data);
-}
-
 static int return_stored_frame(AVFormatContext *ctx, PayloadContext *data,
                                AVStream *st, AVPacket *pkt, uint32_t *timestamp,
                                const uint8_t *buf, int len);
@@ -223,8 +213,7 @@ RTPDynamicProtocolHandler ff_qcelp_dynamic_handler = {
     .enc_name           = "x-Purevoice",
     .codec_type         = AVMEDIA_TYPE_AUDIO,
     .codec_id           = AV_CODEC_ID_QCELP,
+    .priv_data_size     = sizeof(PayloadContext),
     .static_payload_id  = 12,
-    .alloc              = qcelp_new_context,
-    .free               = qcelp_free_context,
-    .parse_packet       = qcelp_parse_packet
+    .parse_packet       = qcelp_parse_packet,
 };