[FFmpeg-cvslog] lavc/ffv1dec: drop a pointless variable in decode_slice()

Anton Khirnov git at videolan.org
Thu Aug 1 11:16:38 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jul  3 14:40:23 2024 +0200| [3a5c814b19191022affa76e282b69b9aca8883ba] | committer: Anton Khirnov

lavc/ffv1dec: drop a pointless variable in decode_slice()

fsdst is by construction always equal to fs, there is even an
av_assert1() checking that. Just use fs directly.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a5c814b19191022affa76e282b69b9aca8883ba
---

 libavcodec/ffv1dec.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 60d04f04b9..dbb7e082a3 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -267,16 +267,14 @@ static int decode_slice(AVCodecContext *c, void *arg)
 
     if(f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY)) {
         FFV1Context *fssrc = f->fsrc->slice_context[si];
-        FFV1Context *fsdst = f->slice_context[si];
-        av_assert1(fsdst->plane_count == fssrc->plane_count);
-        av_assert1(fsdst == fs);
+        av_assert1(fs->plane_count == fssrc->plane_count);
 
         if (!(p->flags & AV_FRAME_FLAG_KEY))
-            fsdst->slice_damaged |= fssrc->slice_damaged;
+            fs->slice_damaged |= fssrc->slice_damaged;
 
         for (int i = 0; i < f->plane_count; i++) {
             PlaneContext *psrc = &fssrc->plane[i];
-            PlaneContext *pdst = &fsdst->plane[i];
+            PlaneContext *pdst = &fs->plane[i];
 
             av_free(pdst->state);
             av_free(pdst->vlc_state);



More information about the ffmpeg-cvslog mailing list