Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
3272846c
Commit
3272846c
authored
Sep 20, 2017
by
François Cartegnie
🤞
Browse files
codec: feed empty cc blocks when reordering
avoids latency in cc processing due to reorder
parent
ecb368ef
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/codec/avcodec/video.c
View file @
3272846c
...
...
@@ -854,7 +854,7 @@ static void DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p
if
(
p_avcc
)
{
cc_Extract
(
&
p_sys
->
cc
,
CC_PAYLOAD_RAW
,
true
,
p_avcc
->
data
,
p_avcc
->
size
);
if
(
p_sys
->
cc
.
i_data
)
if
(
p_sys
->
cc
.
b_reorder
||
p_sys
->
cc
.
i_data
)
{
block_t
*
p_cc
=
block_Alloc
(
p_sys
->
cc
.
i_data
);
if
(
p_cc
)
...
...
modules/codec/libmpeg2.c
View file @
3272846c
...
...
@@ -707,7 +707,7 @@ static void SendCc( decoder_t *p_dec )
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_cc
=
NULL
;
if
(
p_sys
->
cc
.
i_data
<=
0
)
if
(
!
p_sys
->
cc
.
b_reorder
&&
p_sys
->
cc
.
i_data
<=
0
)
return
;
p_cc
=
block_Alloc
(
p_sys
->
cc
.
i_data
);
...
...
@@ -716,8 +716,8 @@ static void SendCc( decoder_t *p_dec )
memcpy
(
p_cc
->
p_buffer
,
p_sys
->
cc
.
p_data
,
p_sys
->
cc
.
i_data
);
p_cc
->
i_dts
=
p_cc
->
i_pts
=
p_sys
->
cc
.
b_reorder
?
p_sys
->
i_cc_pts
:
p_sys
->
i_cc_dts
;
p_cc
->
i_flags
=
(
p_sys
->
cc
.
b_reorder
?
p_sys
->
i_cc_flags
:
BLOCK_FLAG_TYPE_P
)
&
(
BLOCK_FLAG_TYPE_I
|
BLOCK_FLAG_TYPE_P
|
BLOCK_FLAG_TYPE_B
)
;
decoder_QueueCc
(
p_dec
,
p_cc
,
p_sys
->
cc
.
pb_present
,
0
);
p_cc
->
i_flags
=
p_sys
->
i_cc_flags
&
BLOCK_FLAG_TYPE_MASK
;
decoder_QueueCc
(
p_dec
,
p_cc
,
p_sys
->
cc
.
pb_present
,
p_sys
->
cc
.
b_reorder
?
0
:
-
1
);
}
cc_Flush
(
&
p_sys
->
cc
);
return
;
...
...
modules/packetizer/hxxx_common.c
View file @
3272846c
...
...
@@ -90,7 +90,7 @@ block_t * cc_storage_get_current( cc_storage_t *p_ccs, bool pb_present[4],
for
(
int
i
=
0
;
i
<
4
;
i
++
)
pb_present
[
i
]
=
p_ccs
->
current
.
pb_present
[
i
];
if
(
p_ccs
->
current
.
i_data
<=
0
)
if
(
!
p_ccs
->
current
.
b_reorder
&&
p_ccs
->
current
.
i_data
<=
0
)
return
NULL
;
p_block
=
block_Alloc
(
p_ccs
->
current
.
i_data
);
...
...
modules/packetizer/mpegvideo.c
View file @
3272846c
...
...
@@ -322,7 +322,7 @@ static block_t *GetCc( decoder_t *p_dec, bool pb_present[4], int *pi_reorder_dep
for
(
i
=
0
;
i
<
4
;
i
++
)
pb_present
[
i
]
=
p_sys
->
cc
.
pb_present
[
i
];
if
(
p_sys
->
cc
.
i_data
<=
0
)
if
(
!
p_sys
->
cc
.
b_reorder
&&
p_sys
->
cc
.
i_data
<=
0
)
return
NULL
;
p_cc
=
block_Alloc
(
p_sys
->
cc
.
i_data
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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