Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavcodec/options.c     | 5 +++--
 libavcodec/tests/utils.c | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 35e8ac9313..babab599fc 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -55,15 +55,16 @@ static void *codec_child_next(void *obj, void *prev)
 
 static const AVClass *codec_child_class_next(const AVClass *prev)
 {
+    void *iter = NULL;
     AVCodec *c = NULL;
 
     /* find the codec that corresponds to prev */
-    while (prev && (c = av_codec_next(c)))
+    while (prev && (c = av_codec_iterate(&iter)))
         if (c->priv_class == prev)
             break;
 
     /* find next codec with priv options */
-    while (c = av_codec_next(c))
+    while (c = av_codec_iterate(&iter))
         if (c->priv_class)
             return c->priv_class;
     return NULL;
diff --git a/libavcodec/tests/utils.c b/libavcodec/tests/utils.c
index f6ba7fe66e..5041a4085e 100644
--- a/libavcodec/tests/utils.c
+++ b/libavcodec/tests/utils.c
@@ -19,10 +19,11 @@
 #include "libavcodec/avcodec.h"
 
 int main(void){
+    void *iter = NULL;
     AVCodec *codec = NULL;
     int ret = 0;
 
-    while (codec = av_codec_next(codec)) {
+    while (codec = av_codec_iterate(&iter)) {
         if (av_codec_is_encoder(codec)) {
             if (codec->type == AVMEDIA_TYPE_AUDIO) {
                 if (!codec->sample_fmts) {
-- 
2.24.1 (Apple Git-126)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to