diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-30 22:48:42 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-09-28 08:04:33 +0200 |
commit | 8efae4cbbf510588920d81b7e84d6e80ff1226df (patch) | |
tree | bd47f2c084210b49677b1e6e9fdff0e98a920c1b | |
parent | 1846f3b5b15fceb43228f7a486db5f56eafdea51 (diff) | |
download | ffmpeg-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>
-rw-r--r-- | avconv.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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; } } |