diff mbox series

[FFmpeg-devel,1/3] avcodec/vp3: Move work after ff_thread_finish_setup

Message ID AS8P250MB074416F35B7E361995963E6D8FF0A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 9c9458115e9b64f4b2477d71dbbdf235c179e999
Headers show
Series [FFmpeg-devel,1/3] avcodec/vp3: Move work after ff_thread_finish_setup | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 13, 2023, 2:23 p.m. UTC
all_fragments is not synced between threads; resetting it can wait.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vp3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt Sept. 15, 2023, 11:06 a.m. UTC | #1
Andreas Rheinhardt:
> all_fragments is not synced between threads; resetting it can wait.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/vp3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
> index 5002800ef2..272dd89117 100644
> --- a/libavcodec/vp3.c
> +++ b/libavcodec/vp3.c
> @@ -2757,9 +2757,9 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame,
>              ff_thread_report_progress(&s->last_frame, INT_MAX, 0);
>          }
>      }
> +    ff_thread_finish_setup(avctx);
>  
>      memset(s->all_fragments, 0, s->fragment_count * sizeof(Vp3Fragment));
> -    ff_thread_finish_setup(avctx);
>  
>      if (s->version < 2) {
>          if ((ret = unpack_superblocks(s, &gb)) < 0) {

Will apply this patchset tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 5002800ef2..272dd89117 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2757,9 +2757,9 @@  static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame,
             ff_thread_report_progress(&s->last_frame, INT_MAX, 0);
         }
     }
+    ff_thread_finish_setup(avctx);
 
     memset(s->all_fragments, 0, s->fragment_count * sizeof(Vp3Fragment));
-    ff_thread_finish_setup(avctx);
 
     if (s->version < 2) {
         if ((ret = unpack_superblocks(s, &gb)) < 0) {