[FFmpeg-devel] [PATCH 3/3] avcodec/aacdec_template: log the element order before/after reordering

Jan Ekström jeebjp at gmail.com
Sat Aug 22 14:40:09 EEST 2020


On Sat, Aug 22, 2020 at 2:21 PM Michael Niedermayer
<michael at niedermayer.cc> wrote:
>
> On Sat, Aug 22, 2020 at 12:58:00AM +0300, Jan Ekström wrote:
> > This was quite useful to verify that 22.2 got properly handled,
> > among other things.
> > ---
> >  libavcodec/aacdec_template.c | 26 ++++++++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> >
> > diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
> > index 63604d39fd..b9b9ae5324 100644
> > --- a/libavcodec/aacdec_template.c
> > +++ b/libavcodec/aacdec_template.c
> > @@ -266,6 +266,22 @@ static int count_paired_channels(uint8_t (*layout_map)[3], int tags, int pos,
> >      return num_pos_channels;
> >  }
> >
> > +static void log_e2c(int num, struct elem_to_channel e2c) {
> > +    char buf[128] = { 0 };
> > +
> > +    av_get_channel_layout_string(buf, sizeof(buf), -1, e2c.av_position);
> > +
> > +    av_log(NULL, AV_LOG_DEBUG,
>
> without the NULL contexts i agree that this should be usefull for debuging
>
> with the NULL its only when there is less than 2 streams
>
> thx
>

I agree, unfortunately the function where this gets called from does
not seem to have access to the context as it only has
`(uint8_t (*layout_map)[3], int tags)` as arguments.

Anyways, glad that people in general like the idea. I will then update
this patch to have the logging context passed far enough after the
main parts of this patch set get through.

Jan


More information about the ffmpeg-devel mailing list