Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: patched-ffmpeg-mt/libavformat/metadata.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if(m){ 98 if(m){
99 while(m->count--){ 99 while(m->count--){
100 av_free(m->elems[m->count].key); 100 av_free(m->elems[m->count].key);
101 av_free(m->elems[m->count].value); 101 av_free(m->elems[m->count].value);
102 } 102 }
103 av_free(m->elems); 103 av_free(m->elems);
104 } 104 }
105 av_freep(pm); 105 av_freep(pm);
106 } 106 }
107 107
108 static void metadata_conv(AVMetadata **pm, const AVMetadataConv *d_conv, 108 void metadata_conv(AVMetadata **pm, const AVMetadataConv *d_conv,
109 const AVMetadataConv *s_conv) 109 const AVMetadataConv *s_conv)
110 { 110 {
111 /* TODO: use binary search to look up the two conversion tables 111 /* TODO: use binary search to look up the two conversion tables
112 if the tables are getting big enough that it would matter speed wise */ 112 if the tables are getting big enough that it would matter speed wise */
113 const AVMetadataConv *sc, *dc; 113 const AVMetadataConv *sc, *dc;
114 AVMetadataTag *mtag = NULL; 114 AVMetadataTag *mtag = NULL;
115 AVMetadata *dst = NULL; 115 AVMetadata *dst = NULL;
116 const char *key; 116 const char *key;
117 117
118 while((mtag=av_metadata_get(*pm, "", mtag, AV_METADATA_IGNORE_SUFFIX))) { 118 while((mtag=av_metadata_get(*pm, "", mtag, AV_METADATA_IGNORE_SUFFIX))) {
(...skipping 23 matching lines...) Expand all
142 { 142 {
143 int i; 143 int i;
144 metadata_conv(&ctx->metadata, d_conv, s_conv); 144 metadata_conv(&ctx->metadata, d_conv, s_conv);
145 for (i=0; i<ctx->nb_streams ; i++) 145 for (i=0; i<ctx->nb_streams ; i++)
146 metadata_conv(&ctx->streams [i]->metadata, d_conv, s_conv); 146 metadata_conv(&ctx->streams [i]->metadata, d_conv, s_conv);
147 for (i=0; i<ctx->nb_chapters; i++) 147 for (i=0; i<ctx->nb_chapters; i++)
148 metadata_conv(&ctx->chapters[i]->metadata, d_conv, s_conv); 148 metadata_conv(&ctx->chapters[i]->metadata, d_conv, s_conv);
149 for (i=0; i<ctx->nb_programs; i++) 149 for (i=0; i<ctx->nb_programs; i++)
150 metadata_conv(&ctx->programs[i]->metadata, d_conv, s_conv); 150 metadata_conv(&ctx->programs[i]->metadata, d_conv, s_conv);
151 } 151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698