Browse Source

oggparseskeleton: Check the overall start time before using it.

Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.2
Michael Niedermayer 12 years ago
parent
commit
1a088f61e1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/oggparseskeleton.c

+ 1
- 1
libavformat/oggparseskeleton.c View File

@@ -61,7 +61,7 @@ static int skeleton_header(AVFormatContext *s, int idx)
start_num = AV_RL64(buf+12);
start_den = AV_RL64(buf+20);

if (start_den) {
if (start_den > 0 && start_num > 0) {
int base_den;
av_reduce(&start_time, &base_den, start_num, start_den, INT_MAX);
avpriv_set_pts_info(st, 64, 1, base_den);


Loading…
Cancel
Save