On Fri, Nov 2, 2018 at 10:17 AM Steven Liu <l...@chinaffmpeg.org> wrote: > > fix ticket: 7504 > > Signed-off-by: Steven Liu <l...@chinaffmpeg.org> > --- > libavcodec/aacenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c > index 4d0abb107f..26175bdb39 100644 > --- a/libavcodec/aacenc.c > +++ b/libavcodec/aacenc.c > @@ -973,7 +973,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) > /* Channel map and unspecified bitrate guessing */ > s->channels = avctx->channels; > > - s->needs_pce = 1; > + s->needs_pce = s->options.pce; > for (i = 0; i < FF_ARRAY_ELEMS(aac_normal_chan_layouts); i++) { > if (avctx->channel_layout == aac_normal_chan_layouts[i]) { > s->needs_pce = s->options.pce;
This doesn't seem correct. PCE should be used if you feed the encode a channel layout thats not supported without PCE - and the loop just below your changed line will turn PCE off (or rather defer to the user option) if a layout is used that doesn't need PCE. If you just blindly turn PCE off, you'll cause endless regressions for uncommon channel layouts. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel