[FFmpeg-devel] [PATCH v1 2/2] avcodec/mpeg12enc: Support mpeg2 encoder profile with const options

Hendrik Leppkes h.leppkes at gmail.com
Fri Apr 3 19:19:39 EEST 2020


On Fri, Apr 3, 2020 at 5:47 PM Fu, Linjie <linjie.fu at intel.com> wrote:
>
> > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > Limin Wang
> > Sent: Friday, April 3, 2020 22:55
> > To: ffmpeg-devel at ffmpeg.org
> > Subject: Re: [FFmpeg-devel] [PATCH v1 2/2] avcodec/mpeg12enc: Support
> > mpeg2 encoder profile with const options
> >
> > On Fri, Apr 03, 2020 at 04:25:15PM +0200, Hendrik Leppkes wrote:
> > > On Fri, Apr 3, 2020 at 3:12 PM <lance.lmwang at gmail.com> wrote:
> > > >
> > > > From: Limin Wang <lance.lmwang at gmail.com>
> > > >
> > > > make setting profile more user friendly
> > > >
> > >
> > > Please make sure API users can still set it through avctx->profile,
> > > otherwise this would be an API break.
> >
> > Right, I'll update the patch to check avctx->profile != unknown, then
> > overwrite
> > the s->profile with it to void API break.
> >
> Would it be better to determine the profile with a priority like:
> 1.s->profile; then
> 2. avctx->profile; then
> 3. a default profile;
> in case both avctx->profile and s->profile are set?
>
> If user set a profile explicitly (through either option in cmdline or av_opt_set()),
> above priority seems to be natural. (and libx264 [1] has the same logic)
>

That would be just fine.

- Hendrik


More information about the ffmpeg-devel mailing list