mbox

[FFmpeg-devel,0/1] bug: test pointer to be used.

Message ID 20210104181101.62248-1-alexis@m2osw.com
Headers show

Message

AlexisWilke Jan. 4, 2021, 6:11 p.m. UTC
It looks like the if() and the following lines disagree on the pointer to
be used.

I would imagine that these have been tested so the:

    f = indev_list[i - size];

and

    f = outdev_list[i - size];

are most certainly right, meaning that what's is wrong would be the condition
on the line prior. There is another location in that same file where a
similar test is used and the if() & following access use the same
pointer.

A proper test should call avpriv_register_devices() four times: with both
pointers set to NULL, both pointers not set to NULL, and twice with one of
the pointers set to NULL. That would allow you to verify this fix properly.


AlexisWilke (1):
  bug: test pointer to be used.

 libavformat/allformats.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)