diff options
author | Colin McQuillan <m.niloc@googlemail.com> | 2009-07-27 14:29:06 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2009-07-27 14:29:06 +0000 |
commit | 202a6697ba54293235ce2d7bd5724f4f461e417f (patch) | |
tree | 5c67b537092c6fb1b007f6fae4bc8ff8e22d2659 /libavformat/rtp_vorbis.c | |
parent | fccb1770e6f8b21716e61193396fd9dc2e43b79d (diff) | |
download | ffmpeg-202a6697ba54293235ce2d7bd5724f4f461e417f.tar.gz |
Use named initializers and use new/free_context() instead of extradata()
for context allocators. Patch by Colin McQuillan m niloc googlemail com.
Originally committed as revision 19518 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtp_vorbis.c')
-rw-r--r-- | libavformat/rtp_vorbis.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/rtp_vorbis.c b/libavformat/rtp_vorbis.c index d9bdf4909d..4f6286399e 100644 --- a/libavformat/rtp_vorbis.c +++ b/libavformat/rtp_vorbis.c @@ -143,12 +143,12 @@ ff_vorbis_parse_fmtp_config(AVCodecContext * codec, return result; } -static PayloadContext *vorbis_new_extradata(void) +static PayloadContext *vorbis_new_context(void) { return av_mallocz(sizeof(PayloadContext)); } -static void vorbis_free_extradata(PayloadContext * data) +static void vorbis_free_context(PayloadContext * data) { av_free(data); } @@ -208,11 +208,11 @@ vorbis_handle_packet(AVFormatContext * ctx, } RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = { - "vorbis", - CODEC_TYPE_AUDIO, - CODEC_ID_VORBIS, - NULL, - vorbis_new_extradata, - vorbis_free_extradata, - vorbis_handle_packet + .enc_name = "vorbis", + .codec_type = CODEC_TYPE_AUDIO, + .codec_id = CODEC_ID_VORBIS, + .parse_sdp_a_line = NULL, + .open = vorbis_new_context, + .close = vorbis_free_context, + .parse_packet = vorbis_handle_packet }; |