[FFmpeg-devel] [PATCH 13/14] avcodec/ffv1dec: Combine identical checks

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Apr 24 14:14:45 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/ffv1dec.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 060efc25ab..9a755937e6 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -234,16 +234,14 @@ static int decode_slice(AVCodecContext *c, void *arg)
 
     av_assert1(si >= 0 && si < MAX_SLICES && f->slice_context[si] == fs);
 
-    if(f->fsrc && !p->key_frame)
-        ff_thread_await_progress(&f->last_picture, si, 0);
-
     if(f->fsrc && !p->key_frame) {
         FFV1Context *fssrc = f->fsrc->slice_context[si];
         FFV1Context *fsdst = fs;
+
         av_assert1(fsdst->plane_count == fssrc->plane_count);
+        ff_thread_await_progress(&f->last_picture, si, 0);
 
-        if (!p->key_frame)
-            fsdst->slice_damaged |= fssrc->slice_damaged;
+        fsdst->slice_damaged |= fssrc->slice_damaged;
 
         for (i = 0; i < f->plane_count; i++) {
             PlaneContext *psrc = &fssrc->plane[i];
-- 
2.27.0



More information about the ffmpeg-devel mailing list