Anton Khirnov <an...@khirnov.net> writes:

> ---
>  tests/fate-run.sh |   11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
> index 5d3ba4d..8bb1f34 100755
> --- a/tests/fate-run.sh
> +++ b/tests/fate-run.sh
> @@ -75,7 +75,16 @@ probefmt(){
>  }
>
>  avconv(){
> -    run avconv -nostats -threads $threads -thread_type $thread_type 
> -cpuflags $cpuflags "$@"
> +    global_opts="-nostats -cpuflags $cpuflags"
> +    dec_opts="-threads $threads -thread_type $thread_type"
> +    avconv_args="${global_opts}"

The global_opts indirection seems pointless.

> +    for arg in $@; do
> +        if [ ${arg} = "-i" ]; then
> +            avconv_args="${avconv_args} ${dec_opts}"
> +        fi

Maybe a single line using && looks nicer:

        [ ${arg} = -i ] && avconv_args="${avconv_args} ${dec_opts}"

Either way, you don't need quotes around -i.

> +        avconv_args="${avconv_args} ${arg}"
> +    done
> +    run avconv ${avconv_args}
>  }

This assumes there are no spaces in any arguments, but I think that's
already a requirement.

-- 
Måns Rullgård
m...@mansr.com
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to