aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-30 22:48:42 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-05-01 00:03:20 +0200
commit4f6a1c974ff69afa5b40ced0c9e39c90da73235a (patch)
treed77a1947954daa405a7920ebf182f6e232959a70
parent5f161c23573c0756491a132c2a486572bb4b9f62 (diff)
downloadffmpeg-4f6a1c974ff69afa5b40ced0c9e39c90da73235a.tar.gz
Fix parsing of -force_key_frames option.
Currently it always exits with an error when more than one position is specified. Fixes trac issue #1266. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
-rw-r--r--ffmpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index abceb3f50e..37817ccef4 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -4380,9 +4380,12 @@ 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;
ost->forced_kf_pts[i] = parse_time_or_die("force_key_frames", p, 1);
+ p = next;
}
}