Mercurial > libavformat.hg
comparison flvdec.c @ 5982:f74198942337 libavformat
Mark av_metadata_set() as deprecated, and use av_metadata_set2()
in its place.
av_metadata_set() is going to be dropped at the next major bump.
author | stefano |
---|---|
date | Sun, 25 Apr 2010 14:27:42 +0000 |
parents | 12bdd63f5259 |
children | da46dcc05d4a |
comparison
equal
deleted
inserted
replaced
5981:c1cd2ffd5cdc | 5982:f74198942337 |
---|---|
186 acodec = astream ? astream->codec : NULL; | 186 acodec = astream ? astream->codec : NULL; |
187 vcodec = vstream ? vstream->codec : NULL; | 187 vcodec = vstream ? vstream->codec : NULL; |
188 | 188 |
189 if(amf_type == AMF_DATA_TYPE_BOOL) { | 189 if(amf_type == AMF_DATA_TYPE_BOOL) { |
190 av_strlcpy(str_val, num_val > 0 ? "true" : "false", sizeof(str_val)); | 190 av_strlcpy(str_val, num_val > 0 ? "true" : "false", sizeof(str_val)); |
191 av_metadata_set(&s->metadata, key, str_val); | 191 av_metadata_set2(&s->metadata, key, str_val, 0); |
192 } else if(amf_type == AMF_DATA_TYPE_NUMBER) { | 192 } else if(amf_type == AMF_DATA_TYPE_NUMBER) { |
193 snprintf(str_val, sizeof(str_val), "%.f", num_val); | 193 snprintf(str_val, sizeof(str_val), "%.f", num_val); |
194 av_metadata_set(&s->metadata, key, str_val); | 194 av_metadata_set2(&s->metadata, key, str_val, 0); |
195 if(!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE; | 195 if(!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE; |
196 else if(!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0)) | 196 else if(!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0)) |
197 vcodec->bit_rate = num_val * 1024.0; | 197 vcodec->bit_rate = num_val * 1024.0; |
198 else if(!strcmp(key, "audiodatarate") && acodec && 0 <= (int)(num_val * 1024.0)) | 198 else if(!strcmp(key, "audiodatarate") && acodec && 0 <= (int)(num_val * 1024.0)) |
199 acodec->bit_rate = num_val * 1024.0; | 199 acodec->bit_rate = num_val * 1024.0; |
200 } else if (amf_type == AMF_DATA_TYPE_STRING) | 200 } else if (amf_type == AMF_DATA_TYPE_STRING) |
201 av_metadata_set(&s->metadata, key, str_val); | 201 av_metadata_set2(&s->metadata, key, str_val, 0); |
202 } | 202 } |
203 | 203 |
204 return 0; | 204 return 0; |
205 } | 205 } |
206 | 206 |