rtmpsrc: check for failed RTMP context alloc
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Tue, 29 Dec 2015 22:35:14 +0000 (14:35 -0800)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Thu, 31 Dec 2015 01:22:54 +0000 (17:22 -0800)
commit00587eb561c243745defc442f9b139e80a50ba92
treeafc2e95a4abf67606021153f7e8185eff1d8983f
parent17da1ad409f7f03dc9962c053536489f46ce1967
rtmpsrc: check for failed RTMP context alloc

Avoids an unlikely crash.

Arguably, if allocation fails we have no chance of
recovering but nonetheless, RTMP_Alloc can fail and
librtmp's RTMP_init() (called next) assumes a non-NULL
pointer is passed without checking.

Additionally, unify exit path on error.
ext/rtmp/gstrtmpsrc.c