Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
719cc025
Commit
719cc025
authored
Dec 26, 2014
by
Reynaldo H. Verdejo Pinochet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffserver: reflow start_multicast()
Signed-off-by:
Reynaldo H. Verdejo Pinochet
<
reynaldo@osg.samsung.com
>
parent
18011888
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
ffserver.c
ffserver.c
+9
-6
No files found.
ffserver.c
View file @
719cc025
...
...
@@ -489,12 +489,14 @@ static void start_multicast(void)
HTTPContext
*
rtp_c
;
struct
sockaddr_in
dest_addr
=
{
0
};
int
default_port
,
stream_index
;
unsigned
int
random0
,
random1
;
default_port
=
6000
;
for
(
stream
=
config
.
first_stream
;
stream
;
stream
=
stream
->
next
)
{
if
(
stream
->
is_multicast
)
{
unsigned
random0
=
av_lfg_get
(
&
random_state
);
unsigned
random1
=
av_lfg_get
(
&
random_state
);
if
(
!
stream
->
is_multicast
)
continue
;
random0
=
av_lfg_get
(
&
random_state
);
random1
=
av_lfg_get
(
&
random_state
);
/* open the RTP connection */
snprintf
(
session_id
,
sizeof
(
session_id
),
"%08x%08x"
,
random0
,
random1
);
...
...
@@ -525,15 +527,16 @@ static void start_multicast(void)
stream_index
++
)
{
dest_addr
.
sin_port
=
htons
(
stream
->
multicast_port
+
2
*
stream_index
);
if
(
rtp_new_av_stream
(
rtp_c
,
stream_index
,
&
dest_addr
,
NULL
)
<
0
)
{
if
(
rtp_new_av_stream
(
rtp_c
,
stream_index
,
&
dest_addr
,
NULL
)
>=
0
)
{
continue
;
}
http_log
(
"Could not open output stream '%s/streamid=%d'
\n
"
,
stream
->
filename
,
stream_index
);
exit
(
1
);
}
}
rtp_c
->
state
=
HTTPSTATE_SEND_DATA
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment