aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-30 22:48:42 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-05 13:15:36 +0200
commit4c679750cb4cb112c19f862bd733bf6660a935bd (patch)
treedc584a3169c2e4301ba6bdd335c978e67016abfd /avconv.c
parent28fff0d9740e00c2ee82f72a4be55bdbb5e0c8c6 (diff)
downloadffmpeg-4c679750cb4cb112c19f862bd733bf6660a935bd.tar.gz
avconv: fix parsing of -force_key_frames option.
Currently it always exits with an error when more than one position is specified. CC: libav-stable@libav.org
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/avconv.c b/avconv.c
index 961356752a..6517c4bcfc 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2350,10 +2350,18 @@ static void parse_forced_key_frames(char *kf, OutputStream *ost,
av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n");
exit_program(1);
}
+
+ p = kf;
for (i = 0; i < n; i++) {
- p = i ? strchr(p, ',') + 1 : kf;
+ char *next = strchr(p, ',');
+
+ if (next)
+ *next++ = 0;
+
t = parse_time_or_die("force_key_frames", p, 1);
ost->forced_kf_pts[i] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base);
+
+ p = next;
}
}