Mercurial > mplayer.hg
annotate stream/freesdp/common.c @ 28404:613f075b4ef0
Restructure network tests: Always check for both inet_aton and inet_pton.
author | diego |
---|---|
date | Sun, 01 Feb 2009 14:38:28 +0000 |
parents | 4553637b709b |
children | 08a90b0e44e1 |
rev | line source |
---|---|
18823
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1 /* |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
2 This file is part of FreeSDP |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
3 Copyright (C) 2001,2002,2003 Federico Montesino Pouzols <fedemp@suidzer0.org> |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
4 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
5 FreeSDP is free software; you can redistribute it and/or modify it |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
6 under the terms of the GNU General Public License as published by |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
7 the Free Software Foundation; either version 2 of the License, or |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
8 (at your option) any later version. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
9 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
13 GNU General Public License for more details. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
14 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
16 along with this program; if not, write to the Free Software |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
18 */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
19 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
20 /** |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
21 * @file common.c |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
22 * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
23 * @short Implementation of routines common to parse and formatting |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
24 * modules . |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
25 * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
26 * This file implements the routines that operate over data structures |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
27 * that are used in both the parse and formatting modules. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
28 **/ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
29 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
30 #include "priv.h" |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
31 #include "common.h" |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
32 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
33 static void |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
34 safe_free (void *ptr) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
35 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
36 if (ptr) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
37 free (ptr); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
38 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
39 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
40 fsdp_description_t * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
41 fsdp_description_new (void) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
42 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
43 fsdp_description_t *result = malloc (sizeof (fsdp_description_t)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
44 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
45 result->version = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
46 result->o_username = result->o_session_id = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
47 result->o_announcement_version = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
48 result->o_network_type = FSDP_NETWORK_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
49 result->o_address_type = FSDP_ADDRESS_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
50 result->o_address = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
51 result->s_name = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
52 result->i_information = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
53 result->u_uri = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
54 result->emails = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
55 result->emails_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
56 result->phones = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
57 result->phones_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
58 /* At first, there is no session-level definition for these |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
59 parameters */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
60 result->c_network_type = FSDP_NETWORK_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
61 result->c_address_type = FSDP_ADDRESS_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
62 result->c_address.address = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
63 /* there is no session-level definition for these parameters */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
64 result->bw_modifiers = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
65 result->bw_modifiers_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
66 result->time_periods = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
67 result->time_periods_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
68 result->timezone_adj = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
69 result->k_encryption_method = FSDP_ENCRYPTION_METHOD_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
70 result->k_encryption_content = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
71 /* Default/undefined values for attributes */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
72 result->a_category = result->a_keywords = result->a_tool = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
73 result->a_type = FSDP_SESSION_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
74 result->a_sendrecv_mode = FSDP_SENDRECV_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
75 result->a_charset = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
76 result->a_sdplangs = result->a_langs = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
77 result->a_controls = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
78 result->a_range = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
79 result->a_rtpmaps = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
80 result->a_rtpmaps_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
81 result->a_sdplangs_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
82 result->a_langs_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
83 result->a_controls_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
84 result->unidentified_attributes = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
85 result->unidentified_attributes_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
86 result->media_announcements = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
87 result->media_announcements_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
88 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
89 return result; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
90 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
91 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
92 void |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
93 fsdp_description_delete (fsdp_description_t * dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
94 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
95 fsdp_description_recycle (dsc); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
96 safe_free (dsc); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
97 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
98 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
99 void |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
100 fsdp_description_recycle (fsdp_description_t * dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
101 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
102 /* Recursively free all strings and arrays */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
103 unsigned int i, j; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
104 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
105 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
106 return; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
107 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
108 safe_free (dsc->o_username); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
109 safe_free (dsc->o_session_id); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
110 safe_free (dsc->o_announcement_version); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
111 safe_free (dsc->o_address); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
112 safe_free (dsc->s_name); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
113 safe_free (dsc->i_information); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
114 safe_free (dsc->u_uri); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
115 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
116 for (i = 0; i < dsc->emails_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
117 safe_free ((char *) dsc->emails[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
118 safe_free (dsc->emails); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
119 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
120 for (i = 0; i < dsc->phones_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
121 safe_free ((char *) dsc->phones[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
122 safe_free (dsc->phones); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
123 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
124 safe_free (dsc->c_address.address); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
125 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
126 for (i = 0; i < dsc->bw_modifiers_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
127 safe_free (dsc->bw_modifiers[i].b_unknown_bw_modt); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
128 safe_free (dsc->bw_modifiers); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
129 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
130 for (i = 0; i < dsc->time_periods_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
131 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
132 for (j = 0; j < dsc->time_periods[i]->repeats_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
133 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
134 safe_free (dsc->time_periods[i]->repeats[j]->offsets); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
135 safe_free (dsc->time_periods[i]->repeats[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
136 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
137 safe_free (dsc->time_periods[i]->repeats); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
138 safe_free (dsc->time_periods[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
139 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
140 safe_free (dsc->time_periods); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
141 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
142 safe_free (dsc->timezone_adj); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
143 safe_free (dsc->a_category); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
144 safe_free (dsc->a_keywords); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
145 safe_free (dsc->a_tool); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
146 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
147 for (i = 0; i < dsc->a_rtpmaps_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
148 safe_free (dsc->a_rtpmaps[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
149 safe_free (dsc->a_rtpmaps); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
150 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
151 safe_free (dsc->a_charset); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
152 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
153 for (i = 0; i < dsc->a_sdplangs_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
154 safe_free (dsc->a_sdplangs[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
155 safe_free (dsc->a_sdplangs); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
156 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
157 for (i = 0; i < dsc->a_langs_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
158 safe_free (dsc->a_langs[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
159 safe_free (dsc->a_langs); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
160 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
161 for (i = 0; i < dsc->a_controls_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
162 safe_free (dsc->a_controls[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
163 safe_free (dsc->a_controls); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
164 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
165 safe_free (dsc->a_range); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
166 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
167 for (i = 0; i < dsc->media_announcements_count; i++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
168 { |
19460 | 169 if (!dsc->media_announcements[i]) continue; |
18823
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
170 for (j = 0; j < dsc->media_announcements[i]->formats_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
171 safe_free (dsc->media_announcements[i]->formats[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
172 safe_free (dsc->media_announcements[i]->formats); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
173 safe_free (dsc->media_announcements[i]->i_title); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
174 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
175 for (j = 0; j < dsc->media_announcements[i]->bw_modifiers_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
176 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
177 if (FSDP_BW_MOD_TYPE_UNKNOWN == |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
178 dsc->media_announcements[i]->bw_modifiers[j].b_mod_type) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
179 safe_free (dsc->media_announcements[i]->bw_modifiers[j]. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
180 b_unknown_bw_modt); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
181 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
182 safe_free (dsc->media_announcements[i]->bw_modifiers); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
183 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
184 safe_free (dsc->media_announcements[i]->k_encryption_content); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
185 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
186 for (j = 0; j < dsc->media_announcements[i]->a_rtpmaps_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
187 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
188 safe_free (dsc->media_announcements[i]->a_rtpmaps[j]->pt); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
189 safe_free (dsc->media_announcements[i]->a_rtpmaps[j]-> |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
190 encoding_name); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
191 safe_free (dsc->media_announcements[i]->a_rtpmaps[j]->parameters); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
192 safe_free (dsc->media_announcements[i]->a_rtpmaps[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
193 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
194 safe_free (dsc->media_announcements[i]->a_rtpmaps); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
195 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
196 for (j = 0; j < dsc->media_announcements[i]->a_sdplangs_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
197 safe_free (dsc->media_announcements[i]->a_sdplangs[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
198 safe_free (dsc->media_announcements[i]->a_sdplangs); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
199 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
200 for (j = 0; j < dsc->media_announcements[i]->a_langs_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
201 safe_free (dsc->media_announcements[i]->a_langs[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
202 safe_free (dsc->media_announcements[i]->a_langs); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
203 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
204 for (j = 0; j < dsc->media_announcements[i]->a_controls_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
205 safe_free (dsc->media_announcements[i]->a_controls[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
206 safe_free (dsc->media_announcements[i]->a_controls); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
207 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
208 for (j = 0; j < dsc->media_announcements[i]->a_fmtps_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
209 safe_free (dsc->media_announcements[i]->a_fmtps[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
210 safe_free (dsc->media_announcements[i]->a_fmtps); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
211 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
212 for (j = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
213 j < dsc->media_announcements[i]->unidentified_attributes_count; j++) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
214 safe_free (dsc->media_announcements[i]->unidentified_attributes[j]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
215 safe_free (dsc->media_announcements[i]->unidentified_attributes); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
216 safe_free (dsc->media_announcements[i]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
217 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
218 safe_free (dsc->media_announcements); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
219 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
220 /* This prevents the user to make the library crash when incorrectly |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
221 using recycled but not rebuilt descriptions */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
222 dsc->emails_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
223 dsc->phones_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
224 dsc->bw_modifiers_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
225 dsc->time_periods_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
226 dsc->media_announcements_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
227 } |