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
This commit is contained in:
parent
28fff0d974
commit
4c679750cb
10
avconv.c
10
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");
|
av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n");
|
||||||
exit_program(1);
|
exit_program(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p = kf;
|
||||||
for (i = 0; i < n; i++) {
|
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);
|
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);
|
ost->forced_kf_pts[i] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base);
|
||||||
|
|
||||||
|
p = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user