Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sergio Ammirata
VLC
Commits
ffd94cd3
Commit
ffd94cd3
authored
Jul 03, 2021
by
Sergio Ammirata
Browse files
Fix bug and remove message on alloc error
parent
825b6d96
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/access/rist.c
View file @
ffd94cd3
...
...
@@ -184,13 +184,12 @@ static block_t *BlockRIST(stream_t *p_access, bool *restrict eof)
// Prepare one large buffer (when we are behing in reading, otherwise it is the same size as what is being read)
pktout
=
block_Alloc
(
i_total_size
);
if
(
!
pktout
)
{
msg_Err
(
p_access
,
"Couldn't allocate block"
);
if
(
unlikely
(
pktout
==
NULL
)
)
{
goto
failed_cleanup
;
}
size_t
block_offset
=
0
;
for
(
size_t
i
=
0
;
i
<
=
i_rist_items_index
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
i_rist_items_index
;
++
i
)
{
memcpy
(
pktout
->
p_buffer
+
block_offset
,
p_sys
->
rist_items
[
i
]
->
payload
,
p_sys
->
rist_items
[
i
]
->
payload_len
);
block_offset
+=
p_sys
->
rist_items
[
i
]
->
payload_len
;
rist_receiver_data_block_free2
(
&
p_sys
->
rist_items
[
i
]);
...
...
@@ -200,7 +199,7 @@ static block_t *BlockRIST(stream_t *p_access, bool *restrict eof)
failed_cleanup:
if
(
i_total_size
>
0
)
{
for
(
size_t
i
=
0
;
i
<
=
i_rist_items_index
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
i_rist_items_index
;
i
++
)
{
rist_receiver_data_block_free2
(
&
p_sys
->
rist_items
[
i
]);
}
}
...
...
Write
Preview
Supports
Markdown
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