[FFmpeg-devel] [PATCH 4/4] ffmpeg.c: don't autocopy stream/chapter metadata if manual mapping is specified
Anton Khirnov
anton
Mon Nov 1 18:11:33 CET 2010
On Sat, Oct 30, 2010 at 12:14:19AM +0200, Michael Niedermayer wrote:
> 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
what about the other two patches? are they so bad they're beneath a
reply? ;)
--
Anton Khirnov
-------------- 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/20101101/83ec9d74/attachment.pgp>
More information about the ffmpeg-devel
mailing list