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

AlexisWilke alexis at m2osw.com
Mon Jan 4 20:11:00 EET 2021


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(-)

-- 
2.17.1



More information about the ffmpeg-devel mailing list