summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/avio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 45ee86688f..a43b241399 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -85,11 +85,11 @@ const AVClass ffurl_context_class = {
const char *avio_enum_protocols(void **opaque, int output)
{
- URLProtocol **p = opaque;
- *p = ffurl_protocol_next(*p);
- if (!*p) return NULL;
- if ((output && (*p)->url_write) || (!output && (*p)->url_read))
- return (*p)->name;
+ URLProtocol *p;
+ *opaque = ffurl_protocol_next(*opaque);
+ if (!(p = *opaque)) return NULL;
+ if ((output && p->url_write) || (!output && p->url_read))
+ return p->name;
return avio_enum_protocols(opaque, output);
}