fix socket leak in gstplayer

Fixes #2276 - see issue for more details.