-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support io hooks #1
Open
byrcoder
wants to merge
48
commits into
mstorsjo:master
Choose a base branch
from
byrcoder:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Missing semicolon in e42b5d0
This was broken in e42b5d0. This makes adobe auth against akamai servers work again.
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.
The variable is any random challenge, thus the byte order doesn't matter at all.
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.
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.
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.
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.
Commit a928232 changed the layout of the RTMP struct, making it ABI-incompatible with previous versions.
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.
This fixes a leak in this cornercase.
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.: rtmpdump -r rtmp://cp81899.live.edgefcs.net/live/news24-med@28772 --live Some of the packets seemed to contain junk timestamp fields, which often required the extended field.
This fixes authentication with wowza 4.x servers, which don't send any close message in the authentication process.
This makes sure we don't free tcUrl in RTMP_Close when reconnecting, and avoids leaks (or simplifies code to avoid leaks). This fixes connecting with authentication (both adobe and limelight) when the app has been specified separately from the rest of the url. This is only a temporary step while refactoring, this is removed in a later commit.
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.
This gets rid of the overlap between these two flags, shortening the code somewhat.
Section 5.3.1.3 of the RTMP spec say that type 3 packets also should repeat this field. This matches what the parsing code (in RTMP_ReadPacket) does.
Init str on unsupported references
check for input buffer underrun
Fix 39ec7ed move the check to allow valid loop termination
AMFProp_GetObject must make sure the prop is actually an object
Obsolete RTMPPacket_Free() call left over from original C++ to C rewrite
Potential integer overflow in RTMPPacket_Alloc(). Aside: issue 3/7 could not be reproduced.
Ignore zero-length packets
Additional decode input size checks
Nobody's going to sit around waiting for > 2GB to download in one chunk
Thanks for doing this. Code works for me |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My project works with coroutine, while librtmp only support raw tcp send and recv. This commit supports the io behavior determined by the user.