Variants of solution: 1. To check, if gstreamer-plugins-libav is not installed, then generate message like 'gstreamer-plugins-libav is not installed. Please, install it to play this file' after then exit (). 2. To check, if gstreamer-plugins-libav is not installed, then generate message like 'gstreamer-plugins-libav is not installed. If you press 'Yes', you'll hear the sound, but won't see video-stream. 'No' is recommended. Please, install gstreamer-plugins-libav to play video-stream normally'. And two buttons -- 'Yes' and 'No'. But in this case it's anyway needed to avoid memory-leak if user chooses 'Yes'. So, 1. is more lazy way and 2. is more intelligent.