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
65dcdf8b
Commit
65dcdf8b
authored
Apr 19, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ALL: bunch of bug and mem-leak fixes.
parent
bddeded3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
17 deletions
+37
-17
src/demux.c
src/demux.c
+7
-2
src/demux.h
src/demux.h
+5
-2
src/psi.c
src/psi.c
+2
-2
src/tables/eit.c
src/tables/eit.c
+9
-5
src/tables/pat.c
src/tables/pat.c
+3
-1
src/tables/pmt.c
src/tables/pmt.c
+2
-0
src/tables/sdt.c
src/tables/sdt.c
+9
-5
No files found.
src/demux.c
View file @
65dcdf8b
...
...
@@ -2,7 +2,7 @@
* demux.c: DVB subtables demux functions.
*----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN
* $Id
: demux.c,v 1.2 2003/09/23 13:04:54 tooney Exp
$
* $Id$
*
* Authors: Johan Bilien <jobi@via.ecp.fr>
*
...
...
@@ -159,9 +159,14 @@ void dvbpsi_DetachDemux(dvbpsi_handle h_dvbpsi)
{
p_subdec_temp
=
p_subdec
;
p_subdec
=
p_subdec
->
p_next
;
free
(
p_subdec_temp
);
if
(
p_subdec_temp
->
pf_detach
)
p_subdec_temp
->
pf_detach
(
p_demux
,
(
p_subdec_temp
->
i_id
>>
16
)
&
0xFFFF
,
p_subdec_temp
->
i_id
&
0xFFFF
);
else
free
(
p_subdec_temp
);
}
free
(
p_demux
);
if
(
h_dvbpsi
->
p_current_section
)
dvbpsi_DeletePSISections
(
h_dvbpsi
->
p_current_section
);
free
(
h_dvbpsi
);
}
src/demux.h
View file @
65dcdf8b
/*****************************************************************************
* demux.h
* (c)2001-2002 VideoLAN
* $Id
: demux.h,v 1.1 2002/12/11 13:04:56 jobi Exp
$
* $Id$
*
* Authors: Johan Bilien <jobi@via.ecp.fr>
*
...
...
@@ -81,12 +81,15 @@ typedef void (*dvbpsi_demux_subdec_cb_t)
* \typedef struct dvbpsi_demux_subdec_s dvbpsi_demux_subdec_t
* \brief dvbpsi_demux_subdec_t type definition.
*/
struct
dvbpsi_demux_s
;
typedef
struct
dvbpsi_demux_subdec_s
{
uint32_t
i_id
;
dvbpsi_demux_subdec_cb_t
pf_callback
;
void
*
p_cb_data
;
struct
dvbpsi_demux_subdec_s
*
p_next
;
struct
dvbpsi_demux_subdec_s
*
p_next
;
void
(
*
pf_detach
)(
struct
dvbpsi_demux_s
*
,
uint8_t
,
uint16_t
);
}
dvbpsi_demux_subdec_t
;
...
...
src/psi.c
View file @
65dcdf8b
...
...
@@ -2,7 +2,7 @@
* psi.c: common PSI functions
*----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN
* $Id
: psi.c,v 1.4 2002/10/07 14:15:14 sam Exp
$
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
...
...
@@ -160,7 +160,7 @@ dvbpsi_psi_section_t * dvbpsi_NewPSISection(int i_max_size)
else
{
free
(
p_section
);
p_section
=
NULL
;
return
NULL
;
}
p_section
->
p_next
=
NULL
;
...
...
src/tables/eit.c
View file @
65dcdf8b
...
...
@@ -89,6 +89,7 @@ int dvbpsi_AttachEIT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
p_subdec
->
pf_callback
=
&
dvbpsi_GatherEITSections
;
p_subdec
->
p_cb_data
=
p_eit_decoder
;
p_subdec
->
i_id
=
(
uint32_t
)
i_table_id
<<
16
|
(
uint32_t
)
i_extension
;
p_subdec
->
pf_detach
=
dvbpsi_DetachEIT
;
/* Attach the subtable decoder to the demux */
p_subdec
->
p_next
=
p_demux
->
p_first_subdec
;
...
...
@@ -116,7 +117,7 @@ void dvbpsi_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t
i_extension
)
{
dvbpsi_demux_subdec_t
*
p_subdec
;
dvbpsi_demux_subdec_t
*
p_next
_subdec
;
dvbpsi_demux_subdec_t
*
*
pp_prev
_subdec
;
dvbpsi_eit_decoder_t
*
p_eit_decoder
;
unsigned
int
i
;
...
...
@@ -132,8 +133,6 @@ void dvbpsi_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
return
;
}
p_next_subdec
=
p_subdec
->
p_next
;
p_eit_decoder
=
(
dvbpsi_eit_decoder_t
*
)
p_subdec
->
p_cb_data
;
free
(
p_eit_decoder
->
p_building_eit
);
...
...
@@ -141,12 +140,17 @@ void dvbpsi_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
for
(
i
=
0
;
i
<=
255
;
i
++
)
{
if
(
p_eit_decoder
->
ap_sections
[
i
])
free
(
p_eit_decoder
->
ap_sections
[
i
]);
dvbpsi_DeletePSISections
(
p_eit_decoder
->
ap_sections
[
i
]);
}
free
(
p_subdec
->
p_cb_data
);
pp_prev_subdec
=
&
p_demux
->
p_first_subdec
;
while
(
*
pp_prev_subdec
!=
p_subdec
)
pp_prev_subdec
=
&
(
*
pp_prev_subdec
)
->
p_next
;
*
pp_prev_subdec
=
p_subdec
->
p_next
;
free
(
p_subdec
);
p_subdec
=
p_next_subdec
;
}
...
...
src/tables/pat.c
View file @
65dcdf8b
...
...
@@ -2,7 +2,7 @@
* pat.c: PAT decoder/generator
*----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN
* $Id
: pat.c,v 1.4 2002/10/10 09:27:02 sam Exp
$
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
...
...
@@ -108,6 +108,8 @@ void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi)
}
free
(
h_dvbpsi
->
p_private_decoder
);
if
(
h_dvbpsi
->
p_current_section
)
dvbpsi_DeletePSISections
(
h_dvbpsi
->
p_current_section
);
free
(
h_dvbpsi
);
}
...
...
src/tables/pmt.c
View file @
65dcdf8b
...
...
@@ -112,6 +112,8 @@ void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi)
}
free
(
h_dvbpsi
->
p_private_decoder
);
if
(
h_dvbpsi
->
p_current_section
)
dvbpsi_DeletePSISections
(
h_dvbpsi
->
p_current_section
);
free
(
h_dvbpsi
);
}
...
...
src/tables/sdt.c
View file @
65dcdf8b
...
...
@@ -88,6 +88,7 @@ int dvbpsi_AttachSDT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
p_subdec
->
pf_callback
=
&
dvbpsi_GatherSDTSections
;
p_subdec
->
p_cb_data
=
p_sdt_decoder
;
p_subdec
->
i_id
=
(
uint32_t
)
i_table_id
<<
16
|
(
uint32_t
)
i_extension
;
p_subdec
->
pf_detach
=
dvbpsi_DetachSDT
;
/* Attach the subtable decoder to the demux */
p_subdec
->
p_next
=
p_demux
->
p_first_subdec
;
...
...
@@ -115,7 +116,7 @@ void dvbpsi_DetachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t
i_extension
)
{
dvbpsi_demux_subdec_t
*
p_subdec
;
dvbpsi_demux_subdec_t
*
p_next
_subdec
;
dvbpsi_demux_subdec_t
*
*
pp_prev
_subdec
;
dvbpsi_sdt_decoder_t
*
p_sdt_decoder
;
unsigned
int
i
;
...
...
@@ -131,8 +132,6 @@ void dvbpsi_DetachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
return
;
}
p_next_subdec
=
p_subdec
->
p_next
;
p_sdt_decoder
=
(
dvbpsi_sdt_decoder_t
*
)
p_subdec
->
p_cb_data
;
free
(
p_sdt_decoder
->
p_building_sdt
);
...
...
@@ -140,12 +139,17 @@ void dvbpsi_DetachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
for
(
i
=
0
;
i
<=
255
;
i
++
)
{
if
(
p_sdt_decoder
->
ap_sections
[
i
])
free
(
p_sdt_decoder
->
ap_sections
[
i
]);
dvbpsi_DeletePSISections
(
p_sdt_decoder
->
ap_sections
[
i
]);
}
free
(
p_subdec
->
p_cb_data
);
pp_prev_subdec
=
&
p_demux
->
p_first_subdec
;
while
(
*
pp_prev_subdec
!=
p_subdec
)
pp_prev_subdec
=
&
(
*
pp_prev_subdec
)
->
p_next
;
*
pp_prev_subdec
=
p_subdec
->
p_next
;
free
(
p_subdec
);
p_subdec
=
p_next_subdec
;
}
...
...
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