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
36393434
Commit
36393434
authored
Jun 21, 2014
by
Anshul Maheshwari
Committed by
Michael Niedermayer
Jun 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: fix memleak and corruption of AVSubtitle with multiple outputs
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
97578f5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
ffmpeg.c
ffmpeg.c
+4
-0
No files found.
ffmpeg.c
View file @
36393434
...
@@ -805,6 +805,8 @@ static void do_subtitle_out(AVFormatContext *s,
...
@@ -805,6 +805,8 @@ static void do_subtitle_out(AVFormatContext *s,
if
(
output_files
[
ost
->
file_index
]
->
start_time
!=
AV_NOPTS_VALUE
)
if
(
output_files
[
ost
->
file_index
]
->
start_time
!=
AV_NOPTS_VALUE
)
pts
-=
output_files
[
ost
->
file_index
]
->
start_time
;
pts
-=
output_files
[
ost
->
file_index
]
->
start_time
;
for
(
i
=
0
;
i
<
nb
;
i
++
)
{
for
(
i
=
0
;
i
<
nb
;
i
++
)
{
unsigned
save_num_rects
=
sub
->
num_rects
;
ost
->
sync_opts
=
av_rescale_q
(
pts
,
AV_TIME_BASE_Q
,
enc
->
time_base
);
ost
->
sync_opts
=
av_rescale_q
(
pts
,
AV_TIME_BASE_Q
,
enc
->
time_base
);
if
(
!
check_recording_time
(
ost
))
if
(
!
check_recording_time
(
ost
))
return
;
return
;
...
@@ -821,6 +823,8 @@ static void do_subtitle_out(AVFormatContext *s,
...
@@ -821,6 +823,8 @@ static void do_subtitle_out(AVFormatContext *s,
subtitle_out_size
=
avcodec_encode_subtitle
(
enc
,
subtitle_out
,
subtitle_out_size
=
avcodec_encode_subtitle
(
enc
,
subtitle_out
,
subtitle_out_max_size
,
sub
);
subtitle_out_max_size
,
sub
);
if
(
i
==
1
)
sub
->
num_rects
=
save_num_rects
;
if
(
subtitle_out_size
<
0
)
{
if
(
subtitle_out_size
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Subtitle encoding failed
\n
"
);
av_log
(
NULL
,
AV_LOG_FATAL
,
"Subtitle encoding failed
\n
"
);
exit_program
(
1
);
exit_program
(
1
);
...
...
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