summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Übelacker <bernhardu@vr-web.de>2014-07-27 08:38:59 -0700
committerDiego Biurrun <diego@biurrun.de>2014-07-28 13:11:41 -0700
commitdc71f1958846bb1d96de43a4603983dc8450cfcc (patch)
treef4b131d8db99320f22e676aaaf1d5bdafa2e250f
parente76f2d11970484266e67a12961f2339a5c2fccf9 (diff)
downloadffmpeg-streaming-dc71f1958846bb1d96de43a4603983dc8450cfcc.zip
ffmpeg-streaming-dc71f1958846bb1d96de43a4603983dc8450cfcc.tar.gz
video4linux2: Avoid a floating point exception
This avoids a segfault in avconv_opt.c:opt_target when trying to determine the norm.
-rw-r--r--avconv_opt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/avconv_opt.c b/avconv_opt.c
index f8c5245..434ba0b 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -1757,7 +1757,8 @@ static int opt_target(void *optctx, 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) {
OpenPOWER on IntegriCloud