vp9: fix explicit memory order for report_progress.
authorRonald S. Bultje <rsbultje@gmail.com>
Tue, 12 Sep 2017 19:02:20 +0000 (15:02 -0400)
committerRonald S. Bultje <rsbultje@gmail.com>
Tue, 12 Sep 2017 19:26:05 +0000 (15:26 -0400)
libavcodec/vp9.c

index 66ccb6c49ca011e80a7218d0f844e7691db2fd28..6b5de19266f334c32e0960fbb8a696d672870131 100644 (file)
@@ -73,7 +73,7 @@ static int vp9_alloc_entries(AVCodecContext *avctx, int n) {
 
 static void vp9_report_tile_progress(VP9Context *s, int field, int n) {
     pthread_mutex_lock(&s->progress_mutex);
-    atomic_fetch_add_explicit(&s->entries[field], n, memory_order_relaxed);
+    atomic_fetch_add_explicit(&s->entries[field], n, memory_order_release);
     pthread_cond_signal(&s->progress_cond);
     pthread_mutex_unlock(&s->progress_mutex);
 }