Commit dc71f195 authored by Bernhard Übelacker's avatar Bernhard Übelacker Committed by Diego Biurrun

video4linux2: Avoid a floating point exception

This avoids a segfault in avconv_opt.c:opt_target when trying to
determine the norm.
parent e76f2d11
...@@ -1757,7 +1757,8 @@ static int opt_target(void *optctx, const char *opt, const char *arg) ...@@ -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 (j = 0; j < nb_input_files; j++) {
for (i = 0; i < input_files[j]->nb_streams; i++) { for (i = 0; i < input_files[j]->nb_streams; i++) {
AVCodecContext *c = input_files[j]->ctx->streams[i]->codec; 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; continue;
fr = c->time_base.den * 1000 / c->time_base.num; fr = c->time_base.den * 1000 / c->time_base.num;
if (fr == 25000) { if (fr == 25000) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment