diff rtp_h264.c @ 5113:75e51cba276e libavformat

Use named initializers and use new/free_context() instead of extradata() for context allocators. Patch by Colin McQuillan m niloc googlemail com.
author rbultje
date Mon, 27 Jul 2009 14:29:06 +0000
parents 304a0ea063f0
children c8a47f9a36a8
line wrap: on
line diff
--- a/rtp_h264.c	Mon Jul 27 14:03:53 2009 +0000
+++ b/rtp_h264.c	Mon Jul 27 14:29:06 2009 +0000
@@ -316,7 +316,7 @@
 }
 
 /* ---------------- public code */
-static PayloadContext *h264_new_extradata(void)
+static PayloadContext *h264_new_context(void)
 {
     PayloadContext *data =
         av_mallocz(sizeof(PayloadContext) +
@@ -329,7 +329,7 @@
     return data;
 }
 
-static void h264_free_extradata(PayloadContext *data)
+static void h264_free_context(PayloadContext *data)
 {
 #ifdef DEBUG
     int ii;
@@ -406,11 +406,11 @@
 This is the structure for expanding on the dynamic rtp protocols (makes everything static. yay!)
 */
 RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
-    "H264",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_H264,
-    parse_h264_sdp_line,
-    h264_new_extradata,
-    h264_free_extradata,
-    h264_handle_packet
+    .enc_name         = "H264",
+    .codec_type       = CODEC_TYPE_VIDEO,
+    .codec_id         = CODEC_ID_H264,
+    .parse_sdp_a_line = parse_h264_sdp_line,
+    .open             = h264_new_context,
+    .close            = h264_free_context,
+    .parse_packet     = h264_handle_packet
 };