Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
x264
Commits
91965e48
Commit
91965e48
authored
May 01, 2011
by
Anton Mitrofanov
Committed by
Fiona Glaser
May 10, 2011
Browse files
Fix bug in --b-adapt 2 with --rc-lookahead >248
Problem caused by buffer overflow in strcpy.
parent
788c2881
Changes
1
Show whitespace changes
Inline
Side-by-side
encoder/slicetype.c
View file @
91965e48
...
...
@@ -1103,9 +1103,9 @@ static int x264_slicetype_path_cost( x264_t *h, x264_mb_analysis_t *a, x264_fram
/* Uses strings due to the fact that the speed of the control functions is
negligible compared to the cost of running slicetype_frame_cost, and because
it makes debugging easier. */
static
void
x264_slicetype_path
(
x264_t
*
h
,
x264_mb_analysis_t
*
a
,
x264_frame_t
**
frames
,
int
length
,
char
(
*
best_paths
)[
X264_LOOKAHEAD_MAX
]
)
static
void
x264_slicetype_path
(
x264_t
*
h
,
x264_mb_analysis_t
*
a
,
x264_frame_t
**
frames
,
int
length
,
char
(
*
best_paths
)[
X264_LOOKAHEAD_MAX
+
1
]
)
{
char
paths
[
2
][
X264_LOOKAHEAD_MAX
];
char
paths
[
2
][
X264_LOOKAHEAD_MAX
+
1
];
int
num_paths
=
X264_MIN
(
h
->
param
.
i_bframe
+
1
,
length
);
int
best_cost
=
COST_MAX
;
int
idx
=
0
;
...
...
@@ -1279,7 +1279,7 @@ void x264_slicetype_analyse( x264_t *h, int keyframe )
{
if
(
num_frames
>
1
)
{
char
best_paths
[
X264_BFRAME_MAX
+
1
][
X264_LOOKAHEAD_MAX
]
=
{
""
,
"P"
};
char
best_paths
[
X264_BFRAME_MAX
+
1
][
X264_LOOKAHEAD_MAX
+
1
]
=
{
""
,
"P"
};
int
best_path_index
=
num_frames
%
(
X264_BFRAME_MAX
+
1
);
/* Perform the frametype analysis. */
...
...
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