[FFmpeg-devel] [PATCH 2/2] lavf/mpegts: fix av_log use the uninitialized stream id

mypopy at gmail.com mypopy at gmail.com
Mon May 10 15:41:06 EEST 2021


On Mon, May 10, 2021 at 6:33 AM Marton Balint <cus at passwd.hu> wrote:
>
>
>
> On Fri, 7 May 2021, Jun Zhao wrote:
>
> > From: Jun Zhao <barryjzhao at tencent.com>
> >
> > fix av_log use the uninitialized stream id
>
> Actually i is not the correct value even if it is initialized because the
> loop is executed in full.
>
> Either remove remove logging the stream index, it is not super useful
> anyway, or rework the function to find an index instead of an AVStream*,
> that way you can log it cleanly and in the end return something like:
>
> return found_idx == -1 ? NULL : s->streams[p->streams[found_idx].idx];
>
> But it is also fine if you simply remove the PMT stream index logging.
Will follow the comments, thx
>
> Thanks,
> Marton
>


More information about the ffmpeg-devel mailing list