diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-07-03 13:24:23 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-08-01 10:09:25 +0200 |
commit | e1fa107fd1ac22f3f34c2bc5367a7055da784499 (patch) | |
tree | 4d61d2fbbfe8ac5d2228f10544193273b911315b | |
parent | d776fa4e4db4352191f4e6f1fd83c09921e79d25 (diff) | |
download | ffmpeg-e1fa107fd1ac22f3f34c2bc5367a7055da784499.tar.gz |
lavc/ffv1dec: simplify slice index calculation
-rw-r--r-- | libavcodec/ffv1dec.c | 5 |
1 files changed, 1 insertions, 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); |