This question still has nothing to do with Qt
You never initialise capture1 with a valid, non-NULL pointer so you are probably going to crash the program at line 34 when you first use that pointer. If you had not commented out the checks between line 22 and 30 you would have known this.
You only create a single display window called "result", and then try to output two video streams to windows called "Left" and "Right" (which don't exist), and finally clean up a two windows called "result" (which exist) and "result1" (which does not).
Bookmarks