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
2aee5a87
Commit
2aee5a87
authored
Dec 25, 2017
by
Steven Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hlsenc: fix resource leak
fix CID: 1426931 1426929
parent
e712d301
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
hlsenc.c
libavformat/hlsenc.c
+5
-2
No files found.
libavformat/hlsenc.c
View file @
2aee5a87
...
@@ -1899,11 +1899,13 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -1899,11 +1899,13 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Failed to open file '%s'
\n
"
,
av_log
(
NULL
,
AV_LOG_ERROR
,
"Failed to open file '%s'
\n
"
,
vs
->
avf
->
filename
);
vs
->
avf
->
filename
);
av_free
(
old_filename
);
return
ret
;
return
ret
;
}
}
write_styp
(
vs
->
out
);
write_styp
(
vs
->
out
);
ret
=
flush_dynbuf
(
vs
,
&
range_length
);
ret
=
flush_dynbuf
(
vs
,
&
range_length
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_free
(
old_filename
);
return
ret
;
return
ret
;
}
}
ff_format_io_close
(
s
,
&
vs
->
out
);
ff_format_io_close
(
s
,
&
vs
->
out
);
...
@@ -1979,16 +1981,17 @@ static int hls_write_trailer(struct AVFormatContext *s)
...
@@ -1979,16 +1981,17 @@ static int hls_write_trailer(struct AVFormatContext *s)
ret
=
hlsenc_io_open
(
s
,
&
vs
->
out
,
vs
->
avf
->
filename
,
NULL
);
ret
=
hlsenc_io_open
(
s
,
&
vs
->
out
,
vs
->
avf
->
filename
,
NULL
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Failed to open file '%s'
\n
"
,
vs
->
avf
->
filename
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"Failed to open file '%s'
\n
"
,
vs
->
avf
->
filename
);
return
AVERROR
(
ENOENT
)
;
goto
failed
;
}
}
write_styp
(
vs
->
out
);
write_styp
(
vs
->
out
);
ret
=
flush_dynbuf
(
vs
,
&
range_length
);
ret
=
flush_dynbuf
(
vs
,
&
range_length
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
return
ret
;
goto
failed
;
}
}
ff_format_io_close
(
s
,
&
vs
->
out
);
ff_format_io_close
(
s
,
&
vs
->
out
);
}
}
failed:
av_write_trailer
(
oc
);
av_write_trailer
(
oc
);
if
(
oc
->
pb
)
{
if
(
oc
->
pb
)
{
vs
->
size
=
avio_tell
(
vs
->
avf
->
pb
)
-
vs
->
start_pos
;
vs
->
size
=
avio_tell
(
vs
->
avf
->
pb
)
-
vs
->
start_pos
;
...
...
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