[FFmpeg-cvslog] avconv: fix parsing of -force_key_frames option.
Reimar Döffinger
git at videolan.org
Thu Jul 5 21:58:38 CEST 2012
ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Mon Apr 30 22:48:42 2012 +0200| [4c679750cb4cb112c19f862bd733bf6660a935bd] | 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
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c679750cb4cb112c19f862bd733bf6660a935bd
---
avconv.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/avconv.c b/avconv.c
index 9613567..6517c4b 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;
}
}
More information about the ffmpeg-cvslog
mailing list