Merge pull request #20801 from JonasVautherin:fix-gst-error-handling
authorJonas Vautherin <jonas.vautherin@gmail.com>
Fri, 8 Oct 2021 02:07:04 +0000 (04:07 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Oct 2021 02:07:04 +0000 (02:07 +0000)
commit9537a909f7fbcca5e9596846e29cae5e7eb1c86a
tree2e650f435edaa5cacd4e76c10f33229e4a492942
parentdfc94c58f0567446c14aa217d81efb5ca42b5aa8
Merge pull request #20801 from JonasVautherin:fix-gst-error-handling

* Fix gst error handling

* Use the return value instead of the error, which gives no guarantee of being NULL in case of error
* Test err pointer before accessing it
* Remove unreachable code

* videoio(gstreamer): restore check in writer code

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
modules/videoio/src/cap_gstreamer.cpp