[FFmpeg-devel] [PATCH 03/39] lavc/ffv1dec: simplify slice index calculation
Anton Khirnov
anton at khirnov.net
Tue Jul 16 20:11:18 EEST 2024
---
libavcodec/ffv1dec.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 5c515e97b6..7066146477 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -259,10 +259,7 @@ static int decode_slice(AVCodecContext *c, void *arg)
int width, height, x, y, ret;
const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step;
AVFrame * const p = f->cur;
- int si;
-
- for( si=0; fs != f->slice_context[si]; si ++)
- ;
+ const int si = (FFV1Context**)arg - f->slice_context;
if (f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY) && f->last_picture.f)
ff_progress_frame_await(&f->last_picture, si);
--
2.43.0
More information about the ffmpeg-devel
mailing list