[FFmpeg-cvslog] r17670 - in trunk/libavformat: avformat.h metadata.c metadata.h
Michael Niedermayer
michaelni
Sun Mar 1 02:47:11 CET 2009
On Sun, Mar 01, 2009 at 01:52:38AM +0100, Aurelien Jacobs wrote:
> On Sun, 01 Mar 2009 00:05:55 +0000
> M?ns Rullg?rd <mans at mansr.com> wrote:
>
> > aurel <subversion at mplayerhq.hu> writes:
> >
> > > + s_conv1 = (const AVMetadataConv[2]){{key,key}};
> >
> > GCC 2.95 seems to hate statements like this. I'm not sure what the
> > standards say.
>
> Humm... IIRC it is valid C99...
> Well, attached patch should please gcc 2.95, but it is not exacly
> pretty. If someone has better idea to solve this, I would be glad
> to hear about it. Else I will apply attached patch in a few hours.
>
> Aurel
> Index: libavformat/metadata.c
> ===================================================================
> --- libavformat/metadata.c (revision 17670)
> +++ libavformat/metadata.c (working copy)
> @@ -97,24 +97,26 @@
> {
> /* TODO: use binary search to look up the two conversion tables
> if the tables are getting big enough that it would matter speed wise */
> - const AVMetadataConv *s_conv1 = s_conv, *d_conv1 = d_conv, *sc, *dc;
> AVMetadataTag *mtag = NULL;
> AVMetadata *dst = NULL;
> const char *key, *key2;
>
> while((mtag=av_metadata_get(*pm, "", mtag, AV_METADATA_IGNORE_SUFFIX))) {
> key = key2 = mtag->key;
> if (s_conv != d_conv) {
> - if (!s_conv)
> - s_conv1 = (const AVMetadataConv[2]){{key,key}};
> - for (sc=s_conv1; sc->native; sc++)
> if (!strcasecmp(key, sc->native)) {
> key2 = sc->generic;
> break;
> }
> - if (!d_conv)
> - d_conv1 = (const AVMetadataConv[2]){{key2,key2}};
> - for (dc=d_conv1; dc->native; dc++)
> if (!strcasecmp(key2, dc->generic)) {
> key = dc->native;
> break;
if(s_conv)
for (sc=s_conv1; sc->native; sc++)
if (!strcasecmp(key, sc->native)) {
key = sc->generic;
break;
}
if(d_conv)
for (sc=d_conv1; dc->native; dc++)
if (!strcasecmp(key, dc->generic)) {
key = dc->native;
break;
}
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20090301/4bacad55/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list