diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-15 20:35:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-15 20:35:45 +0200 |
commit | 547ec4d3034d81f6d1a0e84bf58168d35f50baab (patch) | |
tree | ac5de33093730f555797f769cea3528315f5b742 /ffmpeg_filter.c | |
parent | af32a1f2d1b81922026488ea5c7bb3ed41779aa2 (diff) | |
download | ffmpeg-547ec4d3034d81f6d1a0e84bf58168d35f50baab.tar.gz |
ffmpeg: check timebase validity before using it.
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r-- | ffmpeg_filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index d0f25d82ad..0a3b2cd78b 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -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; } |