Browse Source

ffmpeg: check timebase validity before using it.

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
547ec4d303
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ffmpeg_filter.c

+ 1
- 1
ffmpeg_filter.c View File

@@ -561,7 +561,7 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
if (!ist->framerate.num) {
AVRational codec_fr = av_inv_q(ist->st->codec->time_base);
codec_fr.den *= ist->st->codec->ticks_per_frame;
if(av_q2d(codec_fr) < av_q2d(fr)*0.7)
if(codec_fr.num>0 && codec_fr.den>0 && av_q2d(codec_fr) < av_q2d(fr)*0.7)
fr = codec_fr;
}



Loading…
Cancel
Save