On Fri, Aug 07, 2020 at 08:43:05AM +0200, Moritz Barsnick wrote:
> On Thu, Jul 30, 2020 at 22:58:58 +0800, lance.lmw...@gmail.com wrote:
> >                  if (codec_id == AV_CODEC_ID_AC3) {
> > +                    int len = 1;
> > +
> > +                    if (ts_st->desc6a.component_type_flag) len++;
> > +                    if (ts_st->desc6a.bsid_flag)           len++;
> > +                    if (ts_st->desc6a.mainid_flag)         len++;
> > +                    if (ts_st->desc6a.asvc_flag)           len++;
> 
> This could be coded as
>     int len = 1
>               + !!(ts_st->desc6a.component_type_flag)
>               + !!(ts_st->desc6a.bsid_flag)
>               + ...

I prefer to your style, it's more simple.

> 
> but I don't know what is preferred (and technically, it results in the
> same amount of machine commands). It probably doesn't matter.
> 
> > +        side_data = (AVDescriptor6A *) av_packet_get_side_data(pkt,
> > +                    AV_PKT_DATA_MPEGTS_DESC_6A, &sd_size);
> 
> Indentation is incorrect.

I haven't make the second line to ident with pkt, for the line will too long
and more difficult to read.

For Kieran prefer to recalculate the descriptor by parse the header so I'll
not update the patchset anyore.

> 
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to