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
9914cd55
Commit
9914cd55
authored
Mar 21, 2011
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvb: do decode_BCD without asprintf
parent
6f4e5ac6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
modules/access/dvb/scan.c
modules/access/dvb/scan.c
+5
-8
No files found.
modules/access/dvb/scan.c
View file @
9914cd55
...
...
@@ -150,15 +150,12 @@ static void scan_service_Delete( scan_service_t *p_srv )
static
int
decode_BCD
(
uint32_t
input
,
uint32_t
*
output
)
{
char
*
psz_decoded
=
""
;
do
*
output
=
0
;
for
(
short
index
=
28
;
index
>=
0
;
index
-=
4
)
{
if
(
asprintf
(
&
psz_decoded
,
"%1d%1d%s"
,
(
input
&
0xf0
)
>>
4
,
input
&
0x0f
,
psz_decoded
?
psz_decoded
:
""
)
<
0
)
return
VLC_ENOMEM
;
input
>>=
8
;
}
while
(
input
);
*
output
=
atol
(
psz_decoded
);
free
(
psz_decoded
);
*
output
*=
10
;
*
output
+=
((
input
>>
index
)
&
0x0f
);
};
return
VLC_SUCCESS
;
}
...
...
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