Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5f8300af
Commit
5f8300af
authored
Aug 07, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegtsenc: Check dynarray_add() for failure
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
92deb289
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
mpegtsenc.c
libavformat/mpegtsenc.c
+10
-7
No files found.
libavformat/mpegtsenc.c
View file @
5f8300af
...
...
@@ -533,14 +533,17 @@ static MpegTSService *mpegts_add_service(MpegTSWrite *ts, int sid,
service
->
pcr_pid
=
0x1fff
;
service
->
provider_name
=
av_strdup
(
provider_name
);
service
->
name
=
av_strdup
(
name
);
if
(
!
service
->
provider_name
||
!
service
->
name
)
{
av_freep
(
&
service
->
provider_name
);
av_freep
(
&
service
->
name
);
av_free
(
service
);
return
NULL
;
}
dynarray_add
(
&
ts
->
services
,
&
ts
->
nb_services
,
service
);
if
(
!
service
->
provider_name
||
!
service
->
name
)
goto
fail
;
if
(
av_dynarray_add_nofree
(
&
ts
->
services
,
&
ts
->
nb_services
,
service
)
<
0
)
goto
fail
;
return
service
;
fail:
av_freep
(
&
service
->
provider_name
);
av_freep
(
&
service
->
name
);
av_free
(
service
);
return
NULL
;
}
static
int64_t
get_pcr
(
const
MpegTSWrite
*
ts
,
AVIOContext
*
pb
)
...
...
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