Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
40486dcf
Commit
40486dcf
authored
Jul 02, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libmpeg2: fix division by zero (fixes #2920)
parent
d8e0025e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
modules/codec/libmpeg2.c
modules/codec/libmpeg2.c
+20
-13
No files found.
modules/codec/libmpeg2.c
View file @
40486dcf
...
...
@@ -285,9 +285,12 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if
(
p_sys
->
p_synchro
)
decoder_SynchroRelease
(
p_sys
->
p_synchro
);
p_sys
->
p_synchro
=
decoder_SynchroInit
(
p_dec
,
(
uint32_t
)((
uint64_t
)
1001000000
*
27
/
p_sys
->
p_info
->
sequence
->
frame_period
)
);
if
(
p_sys
->
p_info
->
sequence
->
frame_period
<=
0
)
p_sys
->
p_synchro
=
NULL
;
else
p_sys
->
p_synchro
=
decoder_SynchroInit
(
p_dec
,
(
uint32_t
)(
UINT64_C
(
1001000000
)
*
27
/
p_sys
->
p_info
->
sequence
->
frame_period
)
);
p_sys
->
b_after_sequence_header
=
true
;
break
;
}
...
...
@@ -726,16 +729,20 @@ static void GetAR( decoder_t *p_dec )
}
}
msg_Dbg
(
p_dec
,
"%dx%d (display %d,%d), aspect %d, sar %i:%i, %u.%03u fps"
,
p_sys
->
p_info
->
sequence
->
picture_width
,
p_sys
->
p_info
->
sequence
->
picture_height
,
p_sys
->
p_info
->
sequence
->
display_width
,
p_sys
->
p_info
->
sequence
->
display_height
,
p_sys
->
i_aspect
,
p_sys
->
i_sar_num
,
p_sys
->
i_sar_den
,
(
uint32_t
)((
uint64_t
)
1001000000
*
27
/
p_sys
->
p_info
->
sequence
->
frame_period
/
1001
),
(
uint32_t
)((
uint64_t
)
1001000000
*
27
/
p_sys
->
p_info
->
sequence
->
frame_period
%
1001
)
);
if
(
p_sys
->
p_info
->
sequence
->
frame_period
>
0
)
msg_Dbg
(
p_dec
,
"%dx%d (display %d,%d), aspect %d, sar %i:%i, %u.%03u fps"
,
p_sys
->
p_info
->
sequence
->
picture_width
,
p_sys
->
p_info
->
sequence
->
picture_height
,
p_sys
->
p_info
->
sequence
->
display_width
,
p_sys
->
p_info
->
sequence
->
display_height
,
p_sys
->
i_aspect
,
p_sys
->
i_sar_num
,
p_sys
->
i_sar_den
,
(
uint32_t
)((
uint64_t
)
1001000000
*
27
/
p_sys
->
p_info
->
sequence
->
frame_period
/
1001
),
(
uint32_t
)((
uint64_t
)
1001000000
*
27
/
p_sys
->
p_info
->
sequence
->
frame_period
%
1001
)
);
else
msg_Dbg
(
p_dec
,
"bad frame period"
);
}
/*****************************************************************************
...
...
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