[FFmpeg-cvslog] avconv: fix parsing of -force_key_frames option.
Reimar Döffinger
git at videolan.org
Tue Oct 16 16:36:02 CEST 2012
ffmpeg | branch: release/0.10 | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Mon Apr 30 22:48:42 2012 +0200| [8efae4cbbf510588920d81b7e84d6e80ff1226df] | committer: Anton Khirnov
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 at libav.org
(cherry picked from commit 4c679750cb4cb112c19f862bd733bf6660a935bd)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8efae4cbbf510588920d81b7e84d6e80ff1226df
---
avconv.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/avconv.c b/avconv.c
index 718fc8d..90bc49c 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;
}
}
More information about the ffmpeg-cvslog
mailing list