diff mbox series

[FFmpeg-devel,05/39] lavc/ffv1dec: drop a pointless variable in decode_slice()

Message ID 20240716171155.31838-5-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/39] tests/fate/vcodec: add vsynth tests for FFV1 version 2 | expand

Checks

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

Commit Message

Anton Khirnov July 16, 2024, 5:11 p.m. UTC
fsdst is by construction always equal to fs, there is even an
av_assert1() checking that. Just use fs directly.
---
 libavcodec/ffv1dec.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Michael Niedermayer July 24, 2024, 6:58 p.m. UTC | #1
On Tue, Jul 16, 2024 at 07:11:20PM +0200, Anton Khirnov wrote:
> fsdst is by construction always equal to fs, there is even an
> av_assert1() checking that. Just use fs directly.
> ---
>  libavcodec/ffv1dec.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)

probably ok

thx

[...]
diff mbox series

Patch

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);