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
3b681a1b
Commit
3b681a1b
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tables/pat.c: Error handling in GenPAT()
Return NULL on failure of building an entire PAT.
parent
4ce2b8c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
src/tables/pat.c
src/tables/pat.c
+17
-0
No files found.
src/tables/pat.c
View file @
3b681a1b
...
...
@@ -388,6 +388,12 @@ dvbpsi_psi_section_t* dvbpsi_GenPATSections(dvbpsi_t *p_dvbpsi,
dvbpsi_pat_program_t
*
p_program
=
p_pat
->
p_first_program
;
int
i_count
=
0
;
if
(
p_current
==
NULL
)
{
dvbpsi_error
(
p_dvbpsi
,
"PAT encoder"
,
"failed to allocate new PSI section"
);
return
NULL
;
}
/* A PAT section can carry up to 253 programs */
if
((
i_max_pps
<=
0
)
||
(
i_max_pps
>
253
))
i_max_pps
=
253
;
...
...
@@ -411,6 +417,11 @@ dvbpsi_psi_section_t* dvbpsi_GenPATSections(dvbpsi_t *p_dvbpsi,
{
p_prev
=
p_current
;
p_current
=
dvbpsi_NewPSISection
(
1024
);
if
(
p_current
==
NULL
)
{
dvbpsi_error
(
p_dvbpsi
,
"PAT encoder"
,
"failed to allocate new PSI section"
);
goto
error
;
}
p_prev
->
p_next
=
p_current
;
i_count
=
1
;
...
...
@@ -449,4 +460,10 @@ dvbpsi_psi_section_t* dvbpsi_GenPATSections(dvbpsi_t *p_dvbpsi,
}
return
p_result
;
error:
/* Cleanup on error */
p_prev
=
p_result
;
dvbpsi_DeletePSISections
(
p_prev
);
return
NULL
;
}
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