[FFmpeg-devel] [PATCH] small metadata API modifications

Michael Niedermayer michaelni
Sun Jan 18 21:33:43 CET 2009

On Sun, Jan 18, 2009 at 07:26:56PM +0100, Aurelien Jacobs wrote:
> Hi,
> I've started looking at conversion of various (de)muxers to the new
> metadata API. From this experience, I found 2 small problems in
> the new metadata API. Well, not really problems... more like ugliness.
>  - Almost all calls to av_metadata_get() will use the flag
>    AV_METADATA_IGNORE_CASE. This creates extra long lines and makes
>    the code harder to read almost everywhere.
>    I propose to replace this flag by the opposit one: AV_METADATA_MATCH_CASE.
>    There is no functionnal change, but most call to av_metadata_get()
>    can just set flags to 0.


>  - av_metadata_set() currently requires an AVMetadataTag as parameter.
>    Most use case looks like this:
>    av_metadata_set(&s->metadata, (const AVMetadataTag){"title", value});
>    IMO this hurts readability, and moreover, this generates a warning
>    (demoting const from "title").
>    I propose to replace this by:
>    av_metadata_set(&s->metadata, "title", value);
>    It is smaller, more readable, more natural and has no const
>    missmatch problem.

iam less happy about this, but fine if you want it

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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-devel/attachments/20090118/8c00aeea/attachment.pgp>

More information about the ffmpeg-devel mailing list