Martin Storsjo [Sat, 5 Jul 2014 21:58:26 +0000 (00:58 +0300)]
Simplify the logic for freeing reused strings in RTMP_Close
Instead of having a plethora of flags indicating the current
state (just to avoid freeing them when closing the previous
connection when reconnecting), split RTMP_Close into CloseInternal,
taking a flag saying whether this is a reconnect or a normal,
final RTMP_Close call.
This also avoids leaks of some strings, if the whole session is
closed while the authentication process is underway.
Martin Panter [Wed, 18 Sep 2013 01:58:01 +0000 (11:58 +1000)]
Extended timestamp field may be present in type 3 chunk headers
As described in Adobe’s RTMP specification dated 21 Dec 2012; also:
* RTMPY ticket #107, “Compressed headers also can have an extended
timestamp”,
http://web.archive.org/web/20120624031323/http://dev.rtmpy.org/ticket/107
* https://rarut.wordpress.com/2012/03/21/announcing-nginx-rtmp-module/
This resolves intermittent hangs, segfaults and crashes I was seeing when
starting ABC News 24 streams, e.g.:
Martin Storsjo [Thu, 5 Dec 2013 09:00:43 +0000 (11:00 +0200)]
Correct the count of bytes written to the initial FLV buffer
This matters if the buffer overflows, when the count is used
for patching the buffer back together. This happens if there
are multiple video packets with zero timestamp at the start
of the stream (before any audio packets), enough to fill the buffer.
Martin Storsjo [Mon, 23 Sep 2013 19:45:29 +0000 (22:45 +0300)]
Include -lgmp in the pkg-config file when building with gnutls
This is required when a user of librtmp is linking statically to
librtmp (when it is built with gnutls support).
Ideally everything of the Requires line should be in
Requires.private, and -lgmp would go into Libs.private - but if
only building a static lib, they should go where they are right
now instead. Keeping all of this where it is right now, for now,
for simplicity.
Martin Storsjo [Mon, 23 Sep 2013 19:05:16 +0000 (22:05 +0300)]
Include the nettle/hogweed crypto libraries in the pkg-config file
These libraries are linked and used as directly as we use gnutls
itself. This fixes linking for callers if librtmp is built
statically or if the linker doesn't support transitive linking.
Martin Storsjo [Thu, 15 Aug 2013 10:37:37 +0000 (13:37 +0300)]
Fix limelight authentication with abbreviated app names
When streaming to limelight, the app name is either a full
"appname/subaccount" or "appname/_definst_". In the latter case,
the app name can be simplified into simply "appname", but the
authentication hashing assumes the /_definst_ still to be present.
Martin Storsjo [Fri, 19 Jul 2013 12:40:25 +0000 (15:40 +0300)]
Don't use non-public gnutls functions
The internal functions gnutls_calc_dh_secret and gnutls_calc_dh_key
have changed signature in recent gnutls versions - don't use them
but manually do roughly the same as what they used to do before
using only public API functions.
Martin Storsjo [Sun, 30 Dec 2012 12:03:58 +0000 (14:03 +0200)]
Only use one challenge value in adobe auth
Some servers (akamai) only include a 'challenge' parameter, no
'opaque' parameter, while others (wowza) include both 'opaque'
and 'challenge'. If 'opaque' is provided, it should be used here,
otherwise 'challenge', but never both.
After this patch, adobe auth works against both wowza and akamai
servers.
LRN [Sat, 5 May 2012 17:15:36 +0000 (21:15 +0400)]
Fix dll name to have SO_VERSION
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
subj is attached
Changes librtmp.dll into librtmp-$(SO_VERSION).dll, the same form that
libtool uses.
librtmp.dll is still created from librtmp-$(SO_VERSION).dll via `ln
- -sf'; obviously, it makes a hardlink when called in MSYS, but that's
no worse than what we have right now.
Please, CC me, since i'm not subscibed to this list
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
Martin Storsjo [Wed, 30 May 2012 19:07:23 +0000 (22:07 +0300)]
Allocate the channel arrays dynamically
This avoids having to allocate space for all theoretical channels
if most of them aren't used. This drops the size of the full
RTMP struct from over 1200 KB to 16 KB (on 64 bit), and as long as
only channels with a low number are used, the amount of total
allocated memory stays far below what it was before.
Martin Storsjo [Mon, 21 May 2012 15:17:30 +0000 (18:17 +0300)]
Buffer more data before returning successfully from HTTP_read, if needed
This fixes issues if the http header and the payload data
are sent in separate packets (as they normally are), and the
buffer contains the full header but none of the payload.
Martin Storsjo [Fri, 15 Jul 2011 10:46:02 +0000 (13:46 +0300)]
Check the return value from RTMP_SendBytesReceived()
This avoids double frees in RTMP_Close(), if the
RTMP_SendBytesReceived() call failed, which earlier led
to RTMP_ReadPacket() writing back an already freed buffer
(freed by RTMP_Close() within WriteN()) into m_vecChannelsIn.