[FFmpeg-cvslog] avcodec/ffv1: remove unneeded variable

Michael Niedermayer git at videolan.org
Mon Apr 13 20:19:33 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 13 20:07:45 2015 +0200| [d19fc69f15c333956dc537604308ee2944be10a3] | committer: Michael Niedermayer

avcodec/ffv1: remove unneeded variable

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ffv1.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index eb613c7..aada565 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -111,7 +111,7 @@ av_cold int ffv1_init_slices_state(FFV1Context *f)
 
 av_cold int ffv1_init_slice_contexts(FFV1Context *f)
 {
-    int i, j;
+    int i;
 
     f->slice_count = f->num_h_slices * f->num_v_slices;
     av_assert0(f->slice_count > 0);
@@ -147,9 +147,9 @@ av_cold int ffv1_init_slice_contexts(FFV1Context *f)
     return 0;
 
 memfail:
-    for (j = 0; j < i; j++) {
-        av_freep(&f->slice_context[j]->sample_buffer);
-        av_freep(&f->slice_context[j]);
+    while(--i >= 0) {
+        av_freep(&f->slice_context[i]->sample_buffer);
+        av_freep(&f->slice_context[i]);
     }
     return AVERROR(ENOMEM);
 }



More information about the ffmpeg-cvslog mailing list