Skip to content
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

hls: fix redirected stream name #1484

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ham3r
Copy link

@ham3r ham3r commented Mar 16, 2020

Fixes on_publish redirection to the new stream name based on the location header

Fixes on_publish redirection to the new stream name based on the location header
@ham3r
Copy link
Author

ham3r commented Mar 16, 2020

Resolves issue: #713 #777

@victory7
Copy link

You just changed the line of one module name located in the config file and the issue fixed ?!
How?

@ham3r
Copy link
Author

ham3r commented Mar 17, 2020

Well, event callback chain of the sub-modules is defined statically. As you can see in the ngx_rtmp_(.*)_postconfiguration function implementation, it replaces ngx_rtmp_publish static pointer, like below:

next_publish = ngx_rtmp_publish;
ngx_rtmp_publish = ngx_rtmp_(.*)_publish;

Any new, configured sub-module uses their own callback as the new "head" of the chain, pushing others further. So, compilation order matters, and it's resolved in reverse order.

To workaround HLS/DASH issue, moving notification sub-module lower in the configuration allows it to be placed closer the beginning of the chain and therefore allows to be evaluated before HLS/DASH sub-module starts their own job.

@victory7
Copy link

Thanks!
So, I'm going to check it out.

@victory7
Copy link

Awesome, it worked well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants