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
Steve Lhomme
VLC
Commits
07c44496
Commit
07c44496
authored
Aug 29, 2008
by
Laurent Aimar
Browse files
Fixed segfault when doing rendering without respecting ffmpeg requirements.
It fixes at least SVQ1 segfaults.
parent
d524ec29
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/codec/avcodec/video.c
View file @
07c44496
...
...
@@ -852,9 +852,16 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
}
/* Some codecs set pix_fmt only after the 1st frame has been decoded,
* so this check is necessary. */
* so we need to check for direct rendering again. */
int
i_width
=
p_sys
->
p_context
->
width
;
int
i_height
=
p_sys
->
p_context
->
height
;
avcodec_align_dimensions
(
p_sys
->
p_context
,
&
i_width
,
&
i_height
);
if
(
GetVlcChroma
(
&
p_dec
->
fmt_out
.
video
,
p_context
->
pix_fmt
)
!=
VLC_SUCCESS
||
p_sys
->
p_context
->
width
%
16
||
p_sys
->
p_context
->
height
%
16
)
p_sys
->
p_context
->
width
%
16
||
p_sys
->
p_context
->
height
%
16
||
/* We only pad picture up to 16 */
PAD
(
p_sys
->
p_context
->
width
,
16
)
<
i_width
||
PAD
(
p_sys
->
p_context
->
height
,
16
)
<
i_height
)
{
msg_Dbg
(
p_dec
,
"disabling direct rendering"
);
p_sys
->
b_direct_rendering
=
0
;
...
...
Write
Preview
Supports
Markdown
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