mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg: check timebase validity before using it.
Found-by: Daemon404 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
af32a1f2d1
commit
547ec4d303
@ -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…
Reference in New Issue
Block a user