Fix non-initialized variable.

Fix coverity #1046926
Properly initialize variable.

There's more to be done there, that got packet is false doesn't mean there's an error, it means we need to call avcodec_encode_video2 again with more data.

Coverity #1046925.
Fix memory leak

Coverity #1046918
Use destructor method.

This class is definitely not thread-safe, nor can be used in more than one instance :(

Coverity #700338
Make libmythfreesurround thread-safe and allowing more than one instance of it...

Was way too complicated for its own good. so what if we need to reallocate memory during creation.. Happens only very occasionally.
Fix priority object type

Priority isn't a mask.
Change argument order for ShowNotificationX

visibility is a field that is going to be more used than priority.

Also, initialise class member in constructor (they would have been initialized in SetNotification()). Coverity #1046928
Check if ctx is null and exit early.

This would never happen.

Coverity #1046919
Fix few memory leaks

Coverity #1046894
Exit early if creation of ringbuffer failed....

MythPlayer::OpenFile can take 20s before it exits as it keeps retrying for that time... Check that the creation of the ringbuffer succeeded, and if not exit early.
Fix Coverity #1028693
Silence coverity report.

Coverity: "Unchecked return value (CHECKED_RETURN) check_return: Calling function "ChannelBase::IsInputAvailable(int, uint &) const" without checking return value (as is done elsewhere 5 out of 6 times)"
However, IsInputAvailable is here only used to calculate plexid_restriction

Coverity #1028692
Silence coverity

This is a false-positive as mpa_picture would be initialized in SetupAVCodecVideo

Coverity #1025911