[FFmpeg-devel] [PATCH] ffmpeg.c: copy global metadata by default.
Michael Niedermayer
michaelni
Wed Mar 31 11:15:05 CEST 2010
On Thu, Mar 18, 2010 at 08:54:14PM +0100, Anton Khirnov wrote:
> Metadata is copied from the first input file with at least one tag to
> all output files.
> ---
> ffmpeg.c | 20 ++++++++++++++++++++
> 1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 5a22dde..a04f052 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2175,6 +2175,26 @@ static int av_encode(AVFormatContext **output_files,
> in_file->iformat->metadata_conv);
> }
>
> + if (!nb_meta_data_maps) {
> + for (i = 0; i < nb_input_files; i++) {
> + is = input_files[i];
> +
> + if (!av_metadata_get(is->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
> + continue;
> +
> + for (j = 0; j < nb_output_files; j++) {
> + AVMetadataTag *t = NULL;
> +
> + os = output_files[j];
> + while ((t = av_metadata_get(is->metadata, "", t,
> + AV_METADATA_IGNORE_SUFFIX)))
> + av_metadata_set2(&os->metadata, t->key, t->value, 0);
> + av_metadata_conv(os, os->oformat->metadata_conv,
> + is->iformat->metadata_conv);
> + }
this looks buggy, if there where any metadata tags in os already
av_metadata_conv() would convert them too
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 1
"Used only once" - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- 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/20100331/0103afa0/attachment.pgp>
More information about the ffmpeg-devel
mailing list