fix endian conversion for (curently unused) case where in buffer != out buffer
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 16 May 2004 16:21:33 +0000 (16:21 +0000)
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 16 May 2004 16:21:33 +0000 (16:21 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@12482 b3059339-0415-0410-9bf9-f77b7e298cf2

libaf/af_format.c

index 7a5fd04..5f5a91d 100644 (file)
@@ -391,6 +391,8 @@ static void endian(void* in, void* out, int len, int bps)
       for(i=0;i<len;i++){
        s=((uint8_t*)in)[3*i];
        ((uint8_t*)out)[3*i]=((uint8_t*)in)[3*i+2];
+       if (in != out)
+         ((uint8_t*)out)[3*i+1]=((uint8_t*)in)[3*i+1];
        ((uint8_t*)out)[3*i+2]=s;
       }
       break;