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

lance.lmwang at gmail.com lance.lmwang at gmail.com
Sat Apr 18 07:17:16 EEST 2020


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;
-- 
2.9.5



More information about the ffmpeg-devel mailing list