On Thu, 5 Jul 2012, Anton Khirnov wrote:

From: Reimar Döffinger <[email protected]>

Currently it always exits with an error when more than
one position is specified.

CC: [email protected]
---
avconv.c |   10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/avconv.c b/avconv.c
index 86f524f..9683175 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2347,10 +2347,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;
    }
}

--
1.7.10

Looks sensible to me.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to