aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-07 11:12:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-10 21:22:13 +0200
commit0487786ffe272af2954ed4d81e827f7ad9e76895 (patch)
tree217aa2180194c3791ec7da74ba9bbbeac5dbadaf
parentca78dcfb19e5c8928f587d33b08c6fb087f3c4f2 (diff)
downloadffmpeg-0487786ffe272af2954ed4d81e827f7ad9e76895.tar.gz
avformat/avio: Remove redundant checks
Checking the return value of av_opt_set() is equivalent to the current checks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavformat/avio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 246683ff58..74a5936f55 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;