Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
25ccf5df
Commit
25ccf5df
authored
Nov 20, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/mux: Always call write_trailer() from av_write_trailer() to avoid a leak.
Fixes ticket #4049.
parent
c661601f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mux.c
libavformat/mux.c
+6
-2
No files found.
libavformat/mux.c
View file @
25ccf5df
...
@@ -926,7 +926,7 @@ int av_write_trailer(AVFormatContext *s)
...
@@ -926,7 +926,7 @@ int av_write_trailer(AVFormatContext *s)
for
(;;
)
{
for
(;;
)
{
AVPacket
pkt
;
AVPacket
pkt
;
ret
=
interleave_packet
(
s
,
&
pkt
,
NULL
,
1
);
ret
=
interleave_packet
(
s
,
&
pkt
,
NULL
,
1
);
if
(
ret
<
0
)
//FIXME cleanup needed for ret<0 ?
if
(
ret
<
0
)
goto
fail
;
goto
fail
;
if
(
!
ret
)
if
(
!
ret
)
break
;
break
;
...
@@ -943,10 +943,14 @@ int av_write_trailer(AVFormatContext *s)
...
@@ -943,10 +943,14 @@ int av_write_trailer(AVFormatContext *s)
goto
fail
;
goto
fail
;
}
}
fail:
if
(
s
->
oformat
->
write_trailer
)
if
(
s
->
oformat
->
write_trailer
)
if
(
ret
>=
0
)
{
ret
=
s
->
oformat
->
write_trailer
(
s
);
ret
=
s
->
oformat
->
write_trailer
(
s
);
}
else
{
s
->
oformat
->
write_trailer
(
s
);
}
fail:
if
(
s
->
pb
)
if
(
s
->
pb
)
avio_flush
(
s
->
pb
);
avio_flush
(
s
->
pb
);
if
(
ret
==
0
)
if
(
ret
==
0
)
...
...
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