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

Limin Wang lance.lmwang at gmail.com
Sat Apr 4 03:11:28 EEST 2020


On Fri, Apr 03, 2020 at 03:47:09PM +0000, Fu, Linjie 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)
I'm OK with the logic, will update the patch change the priority. thx.

> 
> - Linjie
> 
> [1] https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/libx264.c#L806
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list