[FFmpeg-devel] [PATCH 2.a/3] libavformat/protocols.c: avio_enum_protocols(): Move branch to bottom of function
Michael Witten
mfwitten at gmail.com
Wed Aug 11 22:01:12 EEST 2021
A 'goto done;' statement is used to jump to the desired code.
---
libavformat/protocols.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/protocols.c b/libavformat/protocols.c
index 0deadbfbe7..032f07bf72 100644
--- a/libavformat/protocols.c
+++ b/libavformat/protocols.c
@@ -102,11 +102,14 @@ iterate:
return (*p)->name;
}
} else {
- *opaque = NULL;
- return NULL;
+ goto done;
}
++p;
goto iterate;
+
+done:
+ *opaque = NULL;
+ return NULL;
}
const AVClass *avio_protocol_get_class(const char *name)
--
2.22.0
More information about the ffmpeg-devel
mailing list