diff --git a/ffmpeg.c b/ffmpeg.c index 2d2d081fd4..b1fc15800e 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -4696,7 +4696,8 @@ static int opt_target(OptionsContext *o, const char *opt, const char *arg) for (j = 0; j < nb_input_files; j++) { for (i = 0; i < input_files[j].nb_streams; i++) { AVCodecContext *c = input_files[j].ctx->streams[i]->codec; - if (c->codec_type != AVMEDIA_TYPE_VIDEO) + if (c->codec_type != AVMEDIA_TYPE_VIDEO || + !c->time_base.num) continue; fr = c->time_base.den * 1000 / c->time_base.num; if (fr == 25000) {