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
686e89e1
Commit
686e89e1
authored
Oct 18, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed infinite loop.
parent
93bdb6e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
modules/codec/cc.c
modules/codec/cc.c
+6
-15
No files found.
modules/codec/cc.c
View file @
686e89e1
...
...
@@ -148,7 +148,6 @@ struct decoder_sys_t
int
i_block
;
block_t
*
pp_block
[
CC_MAX_REORDER_SIZE
];
block_t
*
p_current
;
int
i_field
;
int
i_channel
;
...
...
@@ -203,7 +202,6 @@ static int Open( vlc_object_t *p_this )
/* init of p_sys */
memset
(
p_sys
,
0
,
sizeof
(
*
p_sys
)
);
p_sys
->
i_block
=
0
;
p_sys
->
p_current
=
NULL
;
p_sys
->
i_field
=
i_field
;
p_sys
->
i_channel
=
i_channel
;
...
...
@@ -234,11 +232,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
for
(
;;
)
{
block_t
*
p_block
;
p_block
=
p_sys
->
p_current
;
if
(
!
p_block
)
p_block
=
Pop
(
p_dec
);
block_t
*
p_block
=
Pop
(
p_dec
);
if
(
!
p_block
)
break
;
...
...
@@ -385,22 +379,18 @@ static subpicture_t *Convert( decoder_t *p_dec, block_t *p_block )
const
int64_t
i_pts
=
p_block
->
i_pts
;
vlc_bool_t
b_changed
=
VLC_FALSE
;
p_sys
->
p_current
=
p_block
;
/* TODO do the real decoding here */
while
(
p_block
&&
p_block
->
i_buffer
>=
3
)
while
(
p_block
->
i_buffer
>=
3
)
{
if
(
p_block
->
p_buffer
[
0
]
==
p_sys
->
i_field
)
b_changed
|=
Eia608Parse
(
&
p_sys
->
eia608
,
p_sys
->
i_channel
,
&
p_block
->
p_buffer
[
1
]
);
p_block
->
i_buffer
-=
3
;
p_block
->
p_buffer
+=
3
;
if
(
p_block
->
i_buffer
<=
0
)
{
block_Release
(
p_block
);
p_sys
->
p_current
=
p_block
=
NULL
;
}
}
if
(
p_block
)
block_Release
(
p_block
);
static
int64_t
i_last
=
0
;
if
(
b_changed
)
//&& i_pts - i_last > 100*1000 )
{
...
...
@@ -1091,6 +1081,7 @@ static vlc_bool_t Eia608Parse( eia608_t *h, int i_channel_selected, const uint8_
Eia608ParseChannel
(
h
,
d1
);
if
(
h
->
i_channel
!=
i_channel_selected
)
return
VLC_FALSE
;
//fprintf( stderr, "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC %x %x\n", data[0], data[1] );
if
(
d1
>=
0x10
)
{
...
...
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