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

Request to Incorporate 3 commits from flypulse fork #15

Open
saket424 opened this issue Feb 17, 2020 · 2 comments
Open

Request to Incorporate 3 commits from flypulse fork #15

saket424 opened this issue Feb 17, 2020 · 2 comments

Comments

@saket424
Copy link

This fork of your project https://github.com/flypulse/rtsp-streaming-server is 3 commits ahead. Can you review them and incorporate the changes into your repo?

Thanks in advance

@chriswiggins
Copy link
Owner

@saket424 What changes exactly? Have you tried the fork?

@saket424
Copy link
Author

Yes I have tried the flypulse forked repo

One commit adds support to node versions higher than 10.0 in package.json
The other two commits are detailed below

commit 8ca12eae2cbab3cdf9c6937620507fcc4047c84b:'Do not crash when invalid rtsp is sent.'
src/lib/Client.ts
-98,8 +98,8 @@ export class Client {


    debug(
      '%s:%s Client set up for path %s, local ports (%s:%s) remote ports (%s:%s)',
-     req.socket.remoteAddress,req.socket.remotePort,
-     this.stream.mount.path,
+     this.remoteAddress,req.socket.remotePort,
+     this.mount.path,
      this.rtpServerPort,this.rtcpServerPort,
      this.remoteRtpPort,this.remoteRtcpPort
    );


commit bd4ad671648d880f35eb20b830405fbcb2856026:'Can accept "stream" instead of "streamid"'
src/lib/utils.ts
@@ -1,7 +1,7 @@
import debug, { IDebugger } from 'debug';
import { URL } from 'url';


- const mountRegex = /(\/\S+)(?:\/streamid=)(\d+)/;
+ const mountRegex = /(\/\S+)(?:\/(streamid|stream)=)(\d+)/;


export interface MountInfo {
  path: string;
@@ -16,12 +16,12 @@ export function getMountInfo (uri: string): MountInfo {
    streamId: -1
  };


-  if (urlObj.pathname.indexOf('streamid') > -1) {
+  if (urlObj.pathname.indexOf('stream') > -1) {
    const match = urlObj.pathname.match(mountRegex);


    if (match) {
      mount.path = match[1];
-     mount.streamId = parseInt(match[2], 10);
+     mount.streamId = parseInt(match[3], 10);
    }
  }

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

No branches or pull requests

2 participants