diff mbox series

[FFmpeg-devel,24/26] avformat/avio: Remove redundant checks

Message ID AS8P250MB0744BD0A6FB2AFEF38D131E48FEEA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 0487786ffe272af2954ed4d81e827f7ad9e76895
Headers show
Series [FFmpeg-devel,v2,01/22] fate/demux, lavf-container: Workaround for AV1-aspect ratio issue | expand

Commit Message

Andreas Rheinhardt Sept. 7, 2023, 10:38 a.m. UTC
Checking the return value of av_opt_set() is equivalent
to the current checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/avio.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/avio.c b/libavformat/avio.c
index a4572d2f05..617c1c0ac0 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -125,10 +125,7 @@  static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up,
 
                 while(ret >= 0 && (key= strchr(p, sep)) && p<key && (val = strchr(key+1, sep))){
                     *val= *key= 0;
-                    if (strcmp(p, "start") && strcmp(p, "end")) {
-                        ret = AVERROR_OPTION_NOT_FOUND;
-                    } else
-                        ret= av_opt_set(uc->priv_data, p, key+1, 0);
+                    ret = av_opt_set(uc->priv_data, p, key+1, 0);
                     if (ret == AVERROR_OPTION_NOT_FOUND)
                         av_log(uc, AV_LOG_ERROR, "Key '%s' not found.\n", p);
                     *val= *key= sep;