Same as last 2 commits. Signed-off-by: Rostislav Pehlivanov <atomnu...@gmail.com> --- libavcodec/utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index baf09119fe..de2dcea54d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -185,8 +185,11 @@ av_cold void avcodec_register(AVCodec *codec) p = last_avcodec; codec->next = NULL; - while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, codec)) - p = &(*p)->next; + /* Iterate through the list until the last entry has been reached */ + do { + *p = codec; + p = &(codec)->next; + } while (*p); last_avcodec = &codec->next; if (codec->init_static_data) -- 2.15.0.417.g466bffb3ac _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel