Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
6e08e54f
Commit
6e08e54f
authored
Dec 05, 2003
by
gbazin
Browse files
* modules/codec/libmpeg2.c: fixed a couple of crashes on bad files.
parent
222d4881
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/codec/libmpeg2.c
View file @
6e08e54f
...
...
@@ -2,7 +2,7 @@
* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: libmpeg2.c,v 1.3
5
2003/1
1/24 23:22
:0
1
gbazin Exp $
* $Id: libmpeg2.c,v 1.3
6
2003/1
2/05 14:58
:0
3
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -178,8 +178,9 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
return
NULL
;
}
if
(
p_block
->
b_discontinuity
&&
p_sys
->
p_synchro
&&
p_sys
->
p_info
->
sequence
->
width
!=
(
unsigned
)
-
1
)
if
(
p_block
->
b_discontinuity
&&
p_sys
->
p_synchro
&&
p_sys
->
p_info
->
sequence
&&
p_sys
->
p_info
->
sequence
->
width
!=
(
unsigned
)
-
1
)
{
vout_SynchroReset
(
p_sys
->
p_synchro
);
if
(
p_sys
->
p_info
->
current_fbuf
!=
NULL
...
...
@@ -420,7 +421,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
(
(
p_sys
->
p_info
->
current_picture
->
flags
&
PIC_MASK_CODING_TYPE
)
!=
B_CODING_TYPE
)
)
{
vout_SynchroReset
(
p_sys
->
p_synchro
);
if
(
p_sys
->
p_synchro
)
vout_SynchroReset
(
p_sys
->
p_synchro
);
}
mpeg2_skip
(
p_sys
->
p_mpeg2dec
,
1
);
p_sys
->
b_skip
=
1
;
...
...
@@ -431,6 +432,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys
->
b_garbage_pic
=
1
;
p_pic
=
p_sys
->
p_info
->
current_fbuf
->
id
;
}
else
if
(
!
p_sys
->
p_info
->
sequence
)
{
break
;
}
else
{
if
(
(
p_pic
=
GetNewPicture
(
p_dec
,
buf
))
==
NULL
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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