[libav-stable] avconv: fix parsing of -force_key_frames option.

Reinhard Tartler siretart at gmail.com
Tue Sep 4 22:36:11 CEST 2012


hi Anton,

the patch below does not seem to apply to 0.8 and earlier. Can you
confirm that or am I missing something?

On Thu, Jul 5, 2012 at 2:56 PM, Reimar Döffinger <git at libav.org> wrote:
> Module: libav
> Branch: master
> Commit: 4c679750cb4cb112c19f862bd733bf6660a935bd
>
> Author:    Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> Committer: Anton Khirnov <anton at khirnov.net>
> Date:      Mon Apr 30 22:48:42 2012 +0200
>
> 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
>
> ---
>
>  avconv.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
>
> 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;
>      }
>  }
>
>
> _______________________________________________
> libav-stable mailing list
> libav-stable at libav.org
> https://lists.libav.org/mailman/listinfo/libav-stable



-- 
regards,
    Reinhard


More information about the libav-stable mailing list