summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/allcodecs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index b1aa7e266b..22d56760ec 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque)
ff_thread_once(&av_codec_static_init, av_codec_init_static);
- if (c)
+ if (c) {
*opaque = (void*)(i + 1);
-
- return &c->p;
+ return &c->p;
+ }
+ return NULL;
}
static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)