Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
47c32bb3
Commit
47c32bb3
authored
May 20, 2013
by
Michael Krufky
Committed by
Jean-Paul Saman
Feb 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dr_86: convert from linked list to array
Signed-off-by:
Michael Krufky
<
mkrufky@linuxtv.org
>
parent
be8f6af0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
20 deletions
+2
-20
src/descriptors/dr_86.c
src/descriptors/dr_86.c
+1
-17
src/descriptors/dr_86.h
src/descriptors/dr_86.h
+1
-3
No files found.
src/descriptors/dr_86.c
View file @
47c32bb3
...
...
@@ -65,19 +65,12 @@ dvbpsi_caption_service_dr_t *dvbpsi_DecodeCaptionServiceDr(dvbpsi_descriptor_t *
p_descriptor
->
p_decoded
=
(
void
*
)
p_decoded
;
p_decoded
->
p_first_service
=
NULL
;
p_decoded
->
i_number_of_services
=
0x1f
&
buf
[
0
];
buf
++
;
for
(
int
i
=
0
;
i
<
p_decoded
->
i_number_of_services
;
i
++
)
{
dvbpsi_caption_service_t
*
p_service
=
(
dvbpsi_caption_service_t
*
)
malloc
(
sizeof
(
dvbpsi_caption_service_t
));
if
(
!
p_service
)
return
NULL
;
memset
(
p_service
,
0
,
sizeof
(
dvbpsi_caption_service_t
));
dvbpsi_caption_service_t
*
p_service
=
&
p_decoded
->
services
[
i
];
memcpy
(
p_service
->
i_iso_639_code
,
buf
,
3
);
buf
+=
3
;
...
...
@@ -88,15 +81,6 @@ dvbpsi_caption_service_dr_t *dvbpsi_DecodeCaptionServiceDr(dvbpsi_descriptor_t *
p_service
->
b_easy_reader
=
0x01
&
(
buf
[
0
]
>>
7
);
p_service
->
b_wide_aspect_ratio
=
0x01
&
(
buf
[
0
]
>>
6
);
if
(
p_decoded
->
p_first_service
==
NULL
)
p_decoded
->
p_first_service
=
p_service
;
else
{
dvbpsi_caption_service_t
*
p_last_service
=
p_decoded
->
p_first_service
;
while
(
p_last_service
->
p_next
!=
NULL
)
p_last_service
=
p_last_service
->
p_next
;
p_last_service
->
p_next
=
p_service
;
}
buf
+=
2
;
}
return
p_decoded
;
...
...
src/descriptors/dr_86.h
View file @
47c32bb3
...
...
@@ -55,8 +55,6 @@ typedef struct dvbpsi_caption_service_s
uint16_t
i_caption_service_number
;
int
b_easy_reader
;
int
b_wide_aspect_ratio
;
struct
dvbpsi_caption_service_s
*
p_next
;
}
dvbpsi_caption_service_t
;
/*****************************************************************************
...
...
@@ -75,7 +73,7 @@ typedef struct dvbpsi_caption_service_s
typedef
struct
dvbpsi_caption_service_dr_s
{
uint8_t
i_number_of_services
;
dvbpsi_caption_service_t
*
p_first_service
;
dvbpsi_caption_service_t
services
[
0x1f
]
;
}
dvbpsi_caption_service_dr_t
;
/*****************************************************************************
...
...
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