Browse Source

Start using intermediate buffers at index 0.
These index variables are incremented before each use, so they should be
initialized to -1.

Originally committed as revision 29977 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

Ramiro Polla 15 years ago
parent
commit
75084e47ff
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libswscale/swscale_template.c

+ 2 - 2
libswscale/swscale_template.c

@@ -2661,8 +2661,8 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s
        will not get executed. This is not really intended but works
        will not get executed. This is not really intended but works
        currently, so people might do it. */
        currently, so people might do it. */
     if (srcSliceY ==0) {
     if (srcSliceY ==0) {
-        lumBufIndex=0;
-        chrBufIndex=0;
+        lumBufIndex=-1;
+        chrBufIndex=-1;
         dstY=0;
         dstY=0;
         lastInLumBuf= -1;
         lastInLumBuf= -1;
         lastInChrBuf= -1;
         lastInChrBuf= -1;