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
62572435
Commit
62572435
authored
Aug 07, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpenc_chain: Check for errors from ffio_fdopen and ffio_open_dyn_packet_buf
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
f542dedf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
rtpenc_chain.c
libavformat/rtpenc_chain.c
+8
-5
No files found.
libavformat/rtpenc_chain.c
View file @
62572435
...
@@ -75,16 +75,19 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
...
@@ -75,16 +75,19 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
avcodec_copy_context
(
rtpctx
->
streams
[
0
]
->
codec
,
st
->
codec
);
avcodec_copy_context
(
rtpctx
->
streams
[
0
]
->
codec
,
st
->
codec
);
if
(
handle
)
{
if
(
handle
)
{
ffio_fdopen
(
&
rtpctx
->
pb
,
handle
);
ret
=
ffio_fdopen
(
&
rtpctx
->
pb
,
handle
);
if
(
ret
<
0
)
ffurl_close
(
handle
);
}
else
}
else
ffio_open_dyn_packet_buf
(
&
rtpctx
->
pb
,
packet_size
);
ret
=
ffio_open_dyn_packet_buf
(
&
rtpctx
->
pb
,
packet_size
);
if
(
!
ret
)
ret
=
avformat_write_header
(
rtpctx
,
&
opts
);
ret
=
avformat_write_header
(
rtpctx
,
&
opts
);
av_dict_free
(
&
opts
);
av_dict_free
(
&
opts
);
if
(
ret
)
{
if
(
ret
)
{
if
(
handle
)
{
if
(
handle
&&
rtpctx
->
pb
)
{
avio_close
(
rtpctx
->
pb
);
avio_close
(
rtpctx
->
pb
);
}
else
{
}
else
if
(
rtpctx
->
pb
)
{
uint8_t
*
ptr
;
uint8_t
*
ptr
;
avio_close_dyn_buf
(
rtpctx
->
pb
,
&
ptr
);
avio_close_dyn_buf
(
rtpctx
->
pb
,
&
ptr
);
av_free
(
ptr
);
av_free
(
ptr
);
...
...
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