rtmpsink: check for failed RTMP context alloc
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Tue, 29 Dec 2015 22:16:58 +0000 (14:16 -0800)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Thu, 31 Dec 2015 01:22:42 +0000 (17:22 -0800)
commit17da1ad409f7f03dc9962c053536489f46ce1967
treeeb4eaa948c4fd8acad2defeb3337c742c9bc0e8c
parent4b93a7167ff1fa82c9d4f23c99d34f4a9df8e629
rtmpsink: 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/gstrtmpsink.c