]> git.sesse.net Git - ffmpeg/commit
dnn/dnn_backend_native: Don't use asserts for checks
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 10 Mar 2021 13:00:26 +0000 (14:00 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 11 Mar 2021 11:39:01 +0000 (12:39 +0100)
commit1e47ef600d7fb7c763f4ba1aef104fcf3f59cfd8
treebb012193634c945d62a46a40b8e79b3c13f40c62
parent0e078c6cfa078475517cc07a500032a42a523587
dnn/dnn_backend_native: Don't use asserts for checks

asserts should not be used instead of ordinary input checks.
Yet the native DNN backend did it: get_input_native() asserted that
the first dimension was one, despite this value coming directly from
the input file without having been sanitized.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/dnn/dnn_backend_native.c