Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc
Commits
25cbae45
Commit
25cbae45
authored
Nov 17, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTMP: factorization
parent
2a960712
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
modules/access/rtmp/access.c
modules/access/rtmp/access.c
+9
-16
No files found.
modules/access/rtmp/access.c
View file @
25cbae45
...
...
@@ -407,19 +407,15 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
tmp_buffer
=
rtmp_encode_packet
(
p_sys
->
p_thread
,
rtmp_packet
);
i_ret
=
net_Write
(
p_sys
->
p_thread
,
p_sys
->
p_thread
->
fd
,
NULL
,
tmp_buffer
,
rtmp_packet
->
length_encoded
);
free
(
rtmp_packet
->
body
->
body
);
free
(
rtmp_packet
->
body
);
free
(
rtmp_packet
);
free
(
tmp_buffer
);
if
(
i_ret
!=
rtmp_packet
->
length_encoded
)
{
free
(
rtmp_packet
->
body
->
body
);
free
(
rtmp_packet
->
body
);
free
(
rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_access
,
"failed send publish start"
);
return
-
1
;
}
free
(
rtmp_packet
->
body
->
body
);
free
(
rtmp_packet
->
body
);
free
(
rtmp_packet
);
free
(
tmp_buffer
);
}
p_access
->
info
.
i_pos
+=
i_len_tmp
;
...
...
@@ -429,19 +425,16 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
tmp_buffer
=
rtmp_encode_packet
(
p_sys
->
p_thread
,
rtmp_packet
);
i_ret
=
net_Write
(
p_sys
->
p_thread
,
p_sys
->
p_thread
->
fd
,
NULL
,
tmp_buffer
,
rtmp_packet
->
length_encoded
);
free
(
rtmp_packet
->
body
->
body
);
free
(
rtmp_packet
->
body
);
free
(
rtmp_packet
);
free
(
tmp_buffer
);
if
(
i_ret
!=
rtmp_packet
->
length_encoded
)
{
free
(
rtmp_packet
->
body
->
body
);
free
(
rtmp_packet
->
body
);
free
(
rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_access
,
"failed send bytes read"
);
return
-
1
;
}
free
(
rtmp_packet
->
body
->
body
);
free
(
rtmp_packet
->
body
);
free
(
rtmp_packet
);
free
(
tmp_buffer
);
}
return
i_len_tmp
;
...
...
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