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
a80a4353
Commit
a80a4353
authored
Oct 29, 2005
by
Marian Durkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport of [13021]
parent
93f3e7ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
16 deletions
+13
-16
include/vlc_block.h
include/vlc_block.h
+0
-2
modules/access/udp.c
modules/access/udp.c
+13
-13
src/misc/block.c
src/misc/block.c
+0
-1
No files found.
include/vlc_block.h
View file @
a80a4353
...
...
@@ -88,8 +88,6 @@ struct block_t
int
i_samples
;
/* Used for audio */
int
i_rate
;
uint16_t
i_seqno
;
/* Used for RTP */
int
i_buffer
;
uint8_t
*
p_buffer
;
...
...
modules/access/udp.c
View file @
a80a4353
...
...
@@ -343,7 +343,7 @@ static inline vlc_bool_t rtp_ChainInsert( access_t *p_access, block_t *p_block )
access_sys_t
*
p_sys
=
(
access_sys_t
*
)
p_access
->
p_sys
;
block_t
*
p_prev
=
NULL
;
block_t
*
p
=
p_sys
->
p_end
;
uint16_t
i_new
=
p_block
->
i_seqno
;
uint16_t
i_new
=
(
uint16_t
)
p_block
->
i_dts
;
uint16_t
i_tmp
=
0
;
if
(
!
p_sys
->
p_list
)
...
...
@@ -357,13 +357,13 @@ static inline vlc_bool_t rtp_ChainInsert( access_t *p_access, block_t *p_block )
for
(
;;
)
{
i_tmp
=
i_new
-
p
->
i_seqno
;
i_tmp
=
i_new
-
(
uint16_t
)
p
->
i_dts
;
if
(
!
i_tmp
)
/* trash duplicate */
break
;
if
(
i_tmp
<
32768
)
{
/* insert after this block ( i_new > p->i_
seqno
) */
{
/* insert after this block ( i_new > p->i_
dts
) */
p_block
->
p_next
=
p
->
p_next
;
p
->
p_next
=
p_block
;
p_block
->
p_prev
=
p
;
...
...
@@ -371,7 +371,7 @@ static inline vlc_bool_t rtp_ChainInsert( access_t *p_access, block_t *p_block )
{
p_prev
->
p_prev
=
p_block
;
msg_Dbg
(
p_access
,
"RTP reordering: insert after %d, new %d"
,
p
->
i_seqno
,
i_new
);
(
uint16_t
)
p
->
i_dts
,
i_new
);
}
else
{
...
...
@@ -385,7 +385,7 @@ static inline vlc_bool_t rtp_ChainInsert( access_t *p_access, block_t *p_block )
if
(
!
p_access
->
info
.
b_prebuffered
||
(
i_tmp
>
32767
)
)
{
msg_Dbg
(
p_access
,
"RTP reordering: prepend %d before %d"
,
i_new
,
p
->
i_seqno
);
i_new
,
(
uint16_t
)
p
->
i_dts
);
p_block
->
p_next
=
p
;
p
->
p_prev
=
p_block
;
p_sys
->
p_list
=
p_block
;
...
...
@@ -397,8 +397,8 @@ static inline vlc_bool_t rtp_ChainInsert( access_t *p_access, block_t *p_block )
/* reordering failed - append the packet to the end of queue */
msg_Dbg
(
p_access
,
"RTP: sequence changed (or buffer too small) "
"new: %d, buffer %d...%d"
,
i_new
,
p
->
i_seqno
,
p_sys
->
p_end
->
i_seqno
);
"new: %d, buffer %d...%d"
,
i_new
,
(
uint16_t
)
p
->
i_dts
,
(
uint16_t
)
p_sys
->
p_end
->
i_dts
);
p_sys
->
p_end
->
p_next
=
p_block
;
p_block
->
p_prev
=
p_sys
->
p_end
;
p_sys
->
p_end
=
p_block
;
...
...
@@ -455,10 +455,10 @@ static block_t *BlockParseRTP( access_t *p_access, block_t *p_block )
if
(
i_skip
>=
p_block
->
i_buffer
)
goto
trash
;
/* Return the packet without the RTP header, remember seqno */
/* Return the packet without the RTP header, remember seqno
in i_dts
*/
p_block
->
i_buffer
-=
i_skip
;
p_block
->
p_buffer
+=
i_skip
;
p_block
->
i_
seqno
=
i_sequence_number
;
p_block
->
i_
dts
=
(
mtime_t
)
i_sequence_number
;
#if 0
/* Emulate packet loss */
...
...
@@ -509,7 +509,7 @@ static block_t *BlockPrebufferRTP( access_t *p_access, block_t *p_block )
p_access
->
info
.
b_prebuffered
=
VLC_TRUE
;
p
=
p_sys
->
p_list
;
p_sys
->
p_list
=
p_sys
->
p_list
->
p_next
;
p_sys
->
i_last_seqno
=
p
->
i_seqno
;
p_sys
->
i_last_seqno
=
(
uint16_t
)
p
->
i_dts
;
p
->
p_next
=
NULL
;
return
p
;
}
...
...
@@ -534,11 +534,11 @@ again:
p
=
p_sys
->
p_list
;
p_sys
->
p_list
=
p_sys
->
p_list
->
p_next
;
p_sys
->
i_last_seqno
++
;
if
(
p_sys
->
i_last_seqno
!=
p
->
i_seqno
)
if
(
p_sys
->
i_last_seqno
!=
(
uint16_t
)
p
->
i_dts
)
{
msg_Dbg
(
p_access
,
"RTP: packet(s) lost, expected %d, got %d"
,
p_sys
->
i_last_seqno
,
p
->
i_seqno
);
p_sys
->
i_last_seqno
=
p
->
i_seqno
;
p_sys
->
i_last_seqno
,
(
uint16_t
)
p
->
i_dts
);
p_sys
->
i_last_seqno
=
(
uint16_t
)
p
->
i_dts
;
}
p
->
p_next
=
NULL
;
return
p
;
...
...
src/misc/block.c
View file @
a80a4353
...
...
@@ -70,7 +70,6 @@ block_t *__block_New( vlc_object_t *p_obj, int i_size )
p_block
->
i_dts
=
0
;
p_block
->
i_length
=
0
;
p_block
->
i_rate
=
0
;
p_block
->
i_seqno
=
0
;
p_block
->
i_buffer
=
i_size
;
p_block
->
p_buffer
=
&
p_sys
->
p_allocated_buffer
[
BLOCK_PADDING_SIZE
+
...
...
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