[FFmpeg-cvslog] ffmpeg: fix parsing of -force_key_frames option.

Nicolas George git at videolan.org
Sat Jun 30 13:59:15 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sat Jun 30 12:09:24 2012 +0200| [20a8dca57fc579dbb0641ccd6dec2686d0ffdf1b] | committer: Nicolas George

ffmpeg: fix parsing of -force_key_frames option.

Identical to commit 4f6a1c9 by Reimar Döffinger,
that was lost after the merge of 19ad567.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20a8dca57fc579dbb0641ccd6dec2686d0ffdf1b
---

 ffmpeg.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index e3ed179..dea93e5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2792,10 +2792,13 @@ 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