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-09-28 08:04:33 +0200
commit8efae4cbbf510588920d81b7e84d6e80ff1226df (patch)
treebd47f2c084210b49677b1e6e9fdff0e98a920c1b /avconv.c
parent1846f3b5b15fceb43228f7a486db5f56eafdea51 (diff)
downloadffmpeg-8efae4cbbf510588920d81b7e84d6e80ff1226df.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 (cherry picked from commit 4c679750cb4cb112c19f862bd733bf6660a935bd) Signed-off-by: Anton Khirnov <anton@khirnov.net>
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 718fc8d6bf..90bc49cc88 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2247,10 +2247,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;
}
}