Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
9f427214
Commit
9f427214
authored
May 08, 2008
by
Miguel Angel Cabrera Moya
Committed by
Jean-Paul Saman
May 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed error handling in function
Signed-off-by:
Jean-Paul Saman
<
jpsaman@videolan.org
>
parent
5c5e0016
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
48 deletions
+19
-48
modules/access/rtmp/rtmp_amf_flv.c
modules/access/rtmp/rtmp_amf_flv.c
+19
-48
No files found.
modules/access/rtmp/rtmp_amf_flv.c
View file @
9f427214
...
...
@@ -228,7 +228,7 @@ const uint8_t FLV_VIDEO_FRAME_TYPE_DISPOSABLE_INTER_FRAME = 0x30;
******************************************************************************/
static
void
rtmp_handler_null
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
);
static
void
rtmp_handler_chunk_size
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
);
static
int
rtmp_handler_invoke
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
);
static
void
rtmp_handler_invoke
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
);
static
void
rtmp_handler_audio_data
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
);
static
void
rtmp_handler_video_data
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
);
static
void
rtmp_handler_notify
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
);
...
...
@@ -1118,7 +1118,7 @@ rtmp_handler_notify( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
free
(
rtmp_packet
);
}
static
int
static
void
rtmp_handler_invoke
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
)
{
rtmp_packet_t
*
tmp_rtmp_packet
;
...
...
@@ -1148,12 +1148,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send connection bandwith"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1168,12 +1164,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send server bandwith"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1188,12 +1180,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send clear stream"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1208,12 +1196,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send reply NetConnection.connect"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1233,12 +1217,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send reply createStream"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1253,12 +1233,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send reset stream"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1273,12 +1249,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send clear stream"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1315,12 +1287,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send reply NetStream.play.reset"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1335,12 +1303,8 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
i_ret
=
net_Write
(
p_thread
,
p_thread
->
fd
,
NULL
,
tmp_buffer
,
tmp_rtmp_packet
->
length_encoded
);
if
(
i_ret
!=
tmp_rtmp_packet
->
length_encoded
)
{
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
msg_Err
(
p_thread
,
"failed send reply NetStream.play.start"
);
return
VLC_EGENERIC
;
goto
error
;
}
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
...
...
@@ -1472,7 +1436,14 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
free
(
rtmp_packet
->
body
->
body
);
free
(
rtmp_packet
->
body
);
free
(
rtmp_packet
);
return
VLC_SUCCESS
;
return
;
error:
free
(
tmp_rtmp_packet
->
body
->
body
);
free
(
tmp_rtmp_packet
->
body
);
free
(
tmp_rtmp_packet
);
free
(
tmp_buffer
);
}
/* length header calculated automatically based on last packet in the same channel */
...
...
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