Revision 9261e6cf

View differences:

libavformat/rdt.c
551 551
    .codec_type       = t, \
552 552
    .codec_id         = CODEC_ID_NONE, \
553 553
    .parse_sdp_a_line = rdt_parse_sdp_line, \
554
    .open             = rdt_new_context, \
555
    .close            = rdt_free_context, \
554
    .alloc            = rdt_new_context, \
555
    .free             = rdt_free_context, \
556 556
    .parse_packet     = rdt_parse_packet \
557 557
}
558 558

  
libavformat/rtpdec.h
126 126
                             int st_index,
127 127
                             PayloadContext *priv_data,
128 128
                             const char *line); ///< Parse the a= line from the sdp field
129
    PayloadContext *(*open) (void); ///< allocate any data needed by the rtp parsing for this dynamic data.
130
    void (*close)(PayloadContext *protocol_data); ///< free any data needed by the rtp parsing for this dynamic data.
129
    PayloadContext *(*alloc) (void); ///< allocate any data needed by the rtp parsing for this dynamic data.
130
    void (*free)(PayloadContext *protocol_data); ///< free any data needed by the rtp parsing for this dynamic data.
131 131
    DynamicPayloadPacketHandlerProc parse_packet; ///< parse handler for this dynamic packet.
132 132

  
133 133
    struct RTPDynamicProtocolHandler_s *next;
libavformat/rtpdec_amr.c
191 191
    .codec_type       = AVMEDIA_TYPE_AUDIO,
192 192
    .codec_id         = CODEC_ID_AMR_NB,
193 193
    .parse_sdp_a_line = amr_parse_sdp_line,
194
    .open             = amr_new_context,
195
    .close            = amr_free_context,
194
    .alloc            = amr_new_context,
195
    .free             = amr_free_context,
196 196
    .parse_packet     = amr_handle_packet,
197 197
};
198 198

  
......
201 201
    .codec_type       = AVMEDIA_TYPE_AUDIO,
202 202
    .codec_id         = CODEC_ID_AMR_WB,
203 203
    .parse_sdp_a_line = amr_parse_sdp_line,
204
    .open             = amr_new_context,
205
    .close            = amr_free_context,
204
    .alloc            = amr_new_context,
205
    .free             = amr_free_context,
206 206
    .parse_packet     = amr_handle_packet,
207 207
};
208 208

  
libavformat/rtpdec_asf.c
286 286
    .codec_type       = t, \
287 287
    .codec_id         = CODEC_ID_NONE, \
288 288
    .parse_sdp_a_line = asfrtp_parse_sdp_line, \
289
    .open             = asfrtp_new_context, \
290
    .close            = asfrtp_free_context, \
289
    .alloc            = asfrtp_new_context, \
290
    .free             = asfrtp_free_context, \
291 291
    .parse_packet     = asfrtp_parse_packet,   \
292 292
}
293 293

  
libavformat/rtpdec_h264.c
398 398
    .codec_type       = AVMEDIA_TYPE_VIDEO,
399 399
    .codec_id         = CODEC_ID_H264,
400 400
    .parse_sdp_a_line = parse_h264_sdp_line,
401
    .open             = h264_new_context,
402
    .close            = h264_free_context,
401
    .alloc            = h264_new_context,
402
    .free             = h264_free_context,
403 403
    .parse_packet     = h264_handle_packet
404 404
};
libavformat/rtpdec_latm.c
181 181
    .codec_type         = AVMEDIA_TYPE_AUDIO,
182 182
    .codec_id           = CODEC_ID_AAC,
183 183
    .parse_sdp_a_line   = latm_parse_sdp_line,
184
    .open               = latm_new_context,
185
    .close              = latm_free_context,
184
    .alloc              = latm_new_context,
185
    .free               = latm_free_context,
186 186
    .parse_packet       = latm_parse_packet
187 187
};
libavformat/rtpdec_mpeg4.c
235 235
    .codec_type         = AVMEDIA_TYPE_VIDEO,
236 236
    .codec_id           = CODEC_ID_MPEG4,
237 237
    .parse_sdp_a_line   = parse_sdp_line,
238
    .open               = NULL,
239
    .close              = NULL,
238
    .alloc              = NULL,
239
    .free               = NULL,
240 240
    .parse_packet       = NULL
241 241
};
242 242

  
......
245 245
    .codec_type         = AVMEDIA_TYPE_AUDIO,
246 246
    .codec_id           = CODEC_ID_AAC,
247 247
    .parse_sdp_a_line   = parse_sdp_line,
248
    .open               = new_context,
249
    .close              = free_context,
248
    .alloc              = new_context,
249
    .free               = free_context,
250 250
    .parse_packet       = aac_parse_packet
251 251
};
libavformat/rtpdec_qcelp.c
223 223
    .codec_type         = AVMEDIA_TYPE_AUDIO,
224 224
    .codec_id           = CODEC_ID_QCELP,
225 225
    .static_payload_id  = 12,
226
    .open               = qcelp_new_context,
227
    .close              = qcelp_free_context,
226
    .alloc              = qcelp_new_context,
227
    .free               = qcelp_free_context,
228 228
    .parse_packet       = qcelp_parse_packet
229 229
};
libavformat/rtpdec_qdm2.c
309 309
    .enc_name         = "X-QDM",
310 310
    .codec_type       = AVMEDIA_TYPE_AUDIO,
311 311
    .codec_id         = CODEC_ID_NONE,
312
    .open             = qdm2_extradata_new,
313
    .close            = qdm2_extradata_free,
312
    .alloc            = qdm2_extradata_new,
313
    .free             = qdm2_extradata_free,
314 314
    .parse_packet     = qdm2_parse_packet,
315 315
};
libavformat/rtpdec_qt.c
244 244
    .enc_name         = s, \
245 245
    .codec_type       = t, \
246 246
    .codec_id         = CODEC_ID_NONE, \
247
    .open             = qt_rtp_new,    \
248
    .close            = qt_rtp_free,   \
247
    .alloc            = qt_rtp_new,    \
248
    .free             = qt_rtp_free,   \
249 249
    .parse_packet     = qt_rtp_parse_packet, \
250 250
}
251 251

  
libavformat/rtpdec_svq3.c
128 128
    .enc_name         = "X-SV3V-ES",
129 129
    .codec_type       = AVMEDIA_TYPE_VIDEO,
130 130
    .codec_id         = CODEC_ID_NONE,      // see if (config_packet) above
131
    .open             = svq3_extradata_new,
132
    .close            = svq3_extradata_free,
131
    .alloc            = svq3_extradata_new,
132
    .free             = svq3_extradata_free,
133 133
    .parse_packet     = svq3_parse_packet,
134 134
};
libavformat/rtpdec_vp8.c
148 148
    .enc_name       = "VP8",
149 149
    .codec_type     = AVMEDIA_TYPE_VIDEO,
150 150
    .codec_id       = CODEC_ID_VP8,
151
    .open           = vp8_new_context,
152
    .close          = vp8_free_context,
151
    .alloc          = vp8_new_context,
152
    .free           = vp8_free_context,
153 153
    .parse_packet   = vp8_handle_packet,
154 154
};
libavformat/rtpdec_xiph.c
389 389
    .codec_type       = AVMEDIA_TYPE_VIDEO,
390 390
    .codec_id         = CODEC_ID_THEORA,
391 391
    .parse_sdp_a_line = xiph_parse_sdp_line,
392
    .open             = xiph_new_context,
393
    .close            = xiph_free_context,
392
    .alloc            = xiph_new_context,
393
    .free             = xiph_free_context,
394 394
    .parse_packet     = xiph_handle_packet
395 395
};
396 396

  
......
399 399
    .codec_type       = AVMEDIA_TYPE_AUDIO,
400 400
    .codec_id         = CODEC_ID_VORBIS,
401 401
    .parse_sdp_a_line = xiph_parse_sdp_line,
402
    .open             = xiph_new_context,
403
    .close            = xiph_free_context,
402
    .alloc            = xiph_new_context,
403
    .free             = xiph_free_context,
404 404
    .parse_packet     = xiph_handle_packet
405 405
};
libavformat/rtsp.c
132 132
        return;
133 133
    codec->codec_id          = handler->codec_id;
134 134
    rtsp_st->dynamic_handler = handler;
135
    if (handler->open)
136
        rtsp_st->dynamic_protocol_context = handler->open();
135
    if (handler->alloc)
136
        rtsp_st->dynamic_protocol_context = handler->alloc();
137 137
}
138 138

  
139 139
/* parse the rtpmap description: <codec_name>/<clock_rate>[/<other params>] */
......
526 526
        rtsp_st = rt->rtsp_streams[i];
527 527
        if (rtsp_st) {
528 528
            if (rtsp_st->dynamic_handler && rtsp_st->dynamic_protocol_context)
529
                rtsp_st->dynamic_handler->close(
529
                rtsp_st->dynamic_handler->free(
530 530
                    rtsp_st->dynamic_protocol_context);
531 531
            av_free(rtsp_st);
532 532
        }

Also available in: Unified diff