[FFmpeg-devel] [PATCH v2] avcodec/bsf: simplify the code

Marton Balint cus at passwd.hu
Sat Apr 25 21:44:57 EEST 2020



On Sat, 18 Apr 2020, lance.lmwang at gmail.com wrote:

> From: Limin Wang <lance.lmwang at gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavcodec/bsf.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c
> index b9fc771..3cacbd4 100644
> --- a/libavcodec/bsf.c
> +++ b/libavcodec/bsf.c
> @@ -534,11 +534,7 @@ int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst)
>         goto end;
>     }
> 
> -    while (1) {
> -        bsf_str = av_strtok(buf, ",", &saveptr);
> -        if (!bsf_str)
> -            break;
> -
> +    while (bsf_str = av_strtok(buf, ",", &saveptr)) {
>         ret = bsf_parse_single(bsf_str, lst);
>         if (ret < 0)
>             goto end;

Thanks, applied.

Regards,
Marton


More information about the ffmpeg-devel mailing list