Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
e63fffe0
Commit
e63fffe0
authored
Oct 14, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed segfault in libmpeg2 when picture allocation failed.
It should close #2195.
parent
a396b96c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
modules/codec/libmpeg2.c
modules/codec/libmpeg2.c
+17
-6
No files found.
modules/codec/libmpeg2.c
View file @
e63fffe0
...
@@ -423,6 +423,8 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -423,6 +423,8 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys
->
p_info
->
current_picture
->
nb_fields
,
i_pts
,
i_dts
,
p_sys
->
p_info
->
current_picture
->
nb_fields
,
i_pts
,
i_dts
,
p_sys
->
p_info
->
sequence
->
flags
&
SEQ_FLAG_LOW_DELAY
);
p_sys
->
p_info
->
sequence
->
flags
&
SEQ_FLAG_LOW_DELAY
);
bool
b_skip
=
false
;
if
(
!
p_dec
->
b_pace_control
&&
!
p_sys
->
b_preroll
&&
if
(
!
p_dec
->
b_pace_control
&&
!
p_sys
->
b_preroll
&&
!
(
p_sys
->
b_slice_i
!
(
p_sys
->
b_slice_i
&&
((
p_sys
->
p_info
->
current_picture
->
flags
&&
((
p_sys
->
p_info
->
current_picture
->
flags
...
@@ -432,11 +434,26 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -432,11 +434,26 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
&
PIC_MASK_CODING_TYPE
,
&
PIC_MASK_CODING_TYPE
,
/*p_sys->p_vout->render_time*/
0
/*FIXME*/
,
/*p_sys->p_vout->render_time*/
0
/*FIXME*/
,
p_sys
->
p_info
->
sequence
->
flags
&
SEQ_FLAG_LOW_DELAY
)
)
p_sys
->
p_info
->
sequence
->
flags
&
SEQ_FLAG_LOW_DELAY
)
)
{
b_skip
=
true
;
}
p_pic
=
NULL
;
if
(
!
b_skip
)
p_pic
=
GetNewPicture
(
p_dec
,
buf
);
if
(
b_skip
||
!
p_pic
)
{
{
mpeg2_skip
(
p_sys
->
p_mpeg2dec
,
1
);
mpeg2_skip
(
p_sys
->
p_mpeg2dec
,
1
);
p_sys
->
b_skip
=
1
;
p_sys
->
b_skip
=
1
;
decoder_SynchroTrash
(
p_sys
->
p_synchro
);
decoder_SynchroTrash
(
p_sys
->
p_synchro
);
mpeg2_set_buf
(
p_sys
->
p_mpeg2dec
,
buf
,
NULL
);
mpeg2_set_buf
(
p_sys
->
p_mpeg2dec
,
buf
,
NULL
);
if
(
!
b_skip
)
{
block_Release
(
p_block
);
return
NULL
;
}
}
}
else
else
{
{
...
@@ -444,12 +461,6 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -444,12 +461,6 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys
->
b_skip
=
0
;
p_sys
->
b_skip
=
0
;
decoder_SynchroDecode
(
p_sys
->
p_synchro
);
decoder_SynchroDecode
(
p_sys
->
p_synchro
);
if
(
(
p_pic
=
GetNewPicture
(
p_dec
,
buf
))
==
NULL
)
{
block_Release
(
p_block
);
return
NULL
;
}
mpeg2_set_buf
(
p_sys
->
p_mpeg2dec
,
buf
,
p_pic
);
mpeg2_set_buf
(
p_sys
->
p_mpeg2dec
,
buf
,
p_pic
);
mpeg2_stride
(
p_sys
->
p_mpeg2dec
,
p_pic
->
p
[
Y_PLANE
].
i_pitch
);
mpeg2_stride
(
p_sys
->
p_mpeg2dec
,
p_pic
->
p
[
Y_PLANE
].
i_pitch
);
}
}
...
...
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