Mercurial > libavformat.hg
comparison metadata.c @ 4157:017e68062073 libavformat
add a typedef for AVMetadata
author | aurel |
---|---|
date | Mon, 05 Jan 2009 23:56:27 +0000 |
parents | bd4d3fee45d0 |
children | ea1e24175669 |
comparison
equal
deleted
inserted
replaced
4156:ccc2608599a5 | 4157:017e68062073 |
---|---|
19 */ | 19 */ |
20 | 20 |
21 #include "metadata.h" | 21 #include "metadata.h" |
22 | 22 |
23 AVMetadataTag * | 23 AVMetadataTag * |
24 av_metadata_get(struct AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags) | 24 av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags) |
25 { | 25 { |
26 unsigned int i, j; | 26 unsigned int i, j; |
27 | 27 |
28 if(!m) | 28 if(!m) |
29 return NULL; | 29 return NULL; |
42 return &m->elems[i]; | 42 return &m->elems[i]; |
43 } | 43 } |
44 return NULL; | 44 return NULL; |
45 } | 45 } |
46 | 46 |
47 int av_metadata_set(struct AVMetadata **pm, AVMetadataTag elem) | 47 int av_metadata_set(AVMetadata **pm, AVMetadataTag elem) |
48 { | 48 { |
49 struct AVMetadata *m= *pm; | 49 AVMetadata *m= *pm; |
50 AVMetadataTag *tag= av_metadata_get(m, elem.key, NULL, 0); | 50 AVMetadataTag *tag= av_metadata_get(m, elem.key, NULL, 0); |
51 | 51 |
52 if(!m) | 52 if(!m) |
53 m=*pm= av_mallocz(sizeof(*m)); | 53 m=*pm= av_mallocz(sizeof(*m)); |
54 | 54 |