[FFmpeg-devel] [PATCH] ffmpeg: Fix setting flags for codec copy.

Michael Niedermayer michaelni at gmx.at
Sat Feb 18 14:21:59 CET 2012


On Sat, Feb 18, 2012 at 10:45:11AM +0100, Reimar Döffinger wrote:
> On Sat, Feb 18, 2012 at 07:54:13AM +0100, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  ffmpeg.c |    9 +++++++++
> >  1 files changed, 9 insertions(+), 0 deletions(-)
> > 
> > diff --git a/ffmpeg.c b/ffmpeg.c
> > index dfe7394..e6c27f6 100644
> > --- a/ffmpeg.c
> > +++ b/ffmpeg.c
> > @@ -4402,6 +4402,15 @@ static void opt_output_file(void *optctx, const char *filename)
> >          }
> >      }
> >  
> > +    for (i = nb_output_streams - oc->nb_streams; i < nb_output_streams; i++) {
> 
> That same loop construct is used in the ffm case, but I don't
> really know what it loops over.
> Is it "set defaults for all following output streams"?
> A small comment would be good IMO.

added


> 
> > +        AVDictionaryEntry *e;
> > +        ost = &output_streams[i];
> > +
> > +        if (ost->stream_copy && (e = av_dict_get(codec_opts, "flags", NULL, 0)))
> 
> Why only stream copy btw? A "for non-stream-copy will it will be
> overwritten by the input codec flags anyway" comment maybe if I
> am guessing right?
> And I assume you did it this way to easily be able to extend it for
> other options, because otherwise having these outside the loop would
> make more sense.

Actully i had a bug in there, fixed


> But otherwise it fixes the issue, so thanks and please commit.

will apply after tests


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120218/9a71750c/attachment.asc>


More information about the ffmpeg-devel mailing list