| OLD | NEW |
| 1 /* | 1 /* |
| 2 * copyright (c) 2009 Michael Niedermayer | 2 * copyright (c) 2009 Michael Niedermayer |
| 3 * | 3 * |
| 4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
| 5 * | 5 * |
| 6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 m->count++; | 79 m->count++; |
| 80 } | 80 } |
| 81 if(!m->count) { | 81 if(!m->count) { |
| 82 av_free(m->elems); | 82 av_free(m->elems); |
| 83 av_freep(pm); | 83 av_freep(pm); |
| 84 } | 84 } |
| 85 | 85 |
| 86 return 0; | 86 return 0; |
| 87 } | 87 } |
| 88 | 88 |
| 89 #if LIBAVFORMAT_VERSION_MAJOR == 52 | 89 #if FF_API_OLD_METADATA |
| 90 int av_metadata_set(AVMetadata **pm, const char *key, const char *value) | 90 int av_metadata_set(AVMetadata **pm, const char *key, const char *value) |
| 91 { | 91 { |
| 92 return av_metadata_set2(pm, key, value, 0); | 92 return av_metadata_set2(pm, key, value, 0); |
| 93 } | 93 } |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 void av_metadata_free(AVMetadata **pm) | 96 void av_metadata_free(AVMetadata **pm) |
| 97 { | 97 { |
| 98 AVMetadata *m= *pm; | 98 AVMetadata *m= *pm; |
| 99 | 99 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 { | 145 { |
| 146 int i; | 146 int i; |
| 147 metadata_conv(&ctx->metadata, d_conv, s_conv); | 147 metadata_conv(&ctx->metadata, d_conv, s_conv); |
| 148 for (i=0; i<ctx->nb_streams ; i++) | 148 for (i=0; i<ctx->nb_streams ; i++) |
| 149 metadata_conv(&ctx->streams [i]->metadata, d_conv, s_conv); | 149 metadata_conv(&ctx->streams [i]->metadata, d_conv, s_conv); |
| 150 for (i=0; i<ctx->nb_chapters; i++) | 150 for (i=0; i<ctx->nb_chapters; i++) |
| 151 metadata_conv(&ctx->chapters[i]->metadata, d_conv, s_conv); | 151 metadata_conv(&ctx->chapters[i]->metadata, d_conv, s_conv); |
| 152 for (i=0; i<ctx->nb_programs; i++) | 152 for (i=0; i<ctx->nb_programs; i++) |
| 153 metadata_conv(&ctx->programs[i]->metadata, d_conv, s_conv); | 153 metadata_conv(&ctx->programs[i]->metadata, d_conv, s_conv); |
| 154 } | 154 } |
| OLD | NEW |