[FFmpeg-devel] [PATCH 4/4] ffmpeg.c: don't autocopy stream/chapter metadata if manual mapping is specified
Michael Niedermayer
michaelni
Sat Oct 30 00:14:19 CEST 2010
On Tue, Oct 26, 2010 at 11:38:16PM +0200, Anton Khirnov wrote:
> ---
> ffmpeg.c | 12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 0acdb4d..338b0d7 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -129,6 +129,8 @@ static int nb_stream_maps;
> static AVMetaDataMap (*meta_data_maps)[2] = NULL;
> static int nb_meta_data_maps;
> static int metadata_global_autocopy = 1;
> +static int metadata_streams_autocopy = 1;
> +static int metadata_chapters_autocopy = 1;
>
> /* indexed by output file stream index */
> static int *streamid_map = NULL;
> @@ -1836,7 +1838,8 @@ static int copy_chapters(int infile, int outfile)
> out_ch->start = FFMAX(0, in_ch->start - ts_off);
> out_ch->end = FFMIN(rt, in_ch->end - ts_off);
>
> - while ((t = av_metadata_get(in_ch->metadata, "", t, AV_METADATA_IGNORE_SUFFIX)))
> + while (metadata_chapters_autocopy &&
> + (t = av_metadata_get(in_ch->metadata, "", t, AV_METADATA_IGNORE_SUFFIX)))
> av_metadata_set2(&out_ch->metadata, t->key, t->value, 0);
please use a if() this will confuse some people otherwise
otherwise ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101030/fbf3655b/attachment.pgp>
More information about the ffmpeg-devel
mailing list