[FFmpeg-cvslog] avformat/avio: Remove redundant checks
Andreas Rheinhardt
git at videolan.org
Sun Sep 10 22:35:23 EEST 2023
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Sep 7 11:12:22 2023 +0200| [0487786ffe272af2954ed4d81e827f7ad9e76895] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0487786ffe272af2954ed4d81e827f7ad9e76895
---
libavformat/avio.c | 5 +----
1 file changed, 1 insertion(+), 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;
More information about the ffmpeg-cvslog
mailing list