diff options
author | Bernhard Übelacker <bernhardu@vr-web.de> | 2014-07-27 08:38:59 -0700 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-07-30 13:09:09 -0700 |
commit | 277103e07fbe22fc8e4361bacd5c6b48133f3ba5 (patch) | |
tree | 4c7fe0003a651c0fa020acf20f11924bdc1bf802 | |
parent | e4fdfdf65d520ce3af13a21ff8a3649e37757af8 (diff) | |
download | ffmpeg-277103e07fbe22fc8e4361bacd5c6b48133f3ba5.tar.gz |
video4linux2: Avoid a floating point exception
This avoids a segfault in avconv_opt.c:opt_target when trying to
determine the norm.
(cherry picked from commit dc71f1958846bb1d96de43a4603983dc8450cfcc)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
-rw-r--r-- | avconv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4212,7 +4212,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) { |