Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
1fd8b92f
Commit
1fd8b92f
authored
Feb 28, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid race in newDiskConn.
parent
d508ae21
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
diskwriter/diskwriter.go
diskwriter/diskwriter.go
+11
-3
No files found.
diskwriter/diskwriter.go
View file @
1fd8b92f
...
@@ -309,9 +309,17 @@ func newDiskConn(client *Client, directory string, up conn.Up, remoteTracks []co
...
@@ -309,9 +309,17 @@ func newDiskConn(client *Client, directory string, up conn.Up, remoteTracks []co
conn
:
&
conn
,
conn
:
&
conn
,
}
}
conn
.
tracks
=
append
(
conn
.
tracks
,
track
)
conn
.
tracks
=
append
(
conn
.
tracks
,
track
)
remote
.
AddLocal
(
track
)
}
}
// Only do this after all tracks have been added to conn, to avoid
// racing on hasVideo.
for
_
,
t
:=
range
conn
.
tracks
{
err
:=
t
.
remote
.
AddLocal
(
t
)
if
err
!=
nil
{
log
.
Printf
(
"Couldn't add disk track: %v"
,
err
)
conn
.
warn
(
"Couldn't add disk track: "
+
err
.
Error
())
}
}
err
:=
up
.
AddLocal
(
&
conn
)
err
:=
up
.
AddLocal
(
&
conn
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -383,7 +391,7 @@ func keyframeDimensions(codec string, data []byte, packet *rtp.Packet) (uint32,
...
@@ -383,7 +391,7 @@ func keyframeDimensions(codec string, data []byte, packet *rtp.Packet) (uint32,
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
0
return
0
,
0
}
}
if
(
!
vp9
.
V
)
{
if
!
vp9
.
V
{
return
0
,
0
return
0
,
0
}
}
w
:=
uint32
(
0
)
w
:=
uint32
(
0
)
...
...
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