[FFmpeg-cvslog] swscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytes

Michael Niedermayer git at videolan.org
Thu Jun 27 20:48:16 EEST 2019


ffmpeg | branch: release/4.1 | Michael Niedermayer <michael at niedermayer.cc> | Mon May 13 12:50:38 2019 +0200| [0a0f052868d33b7660bdebe47cf612ffdfee9be2] | committer: Michael Niedermayer

swscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytes

Some formats use longer names than 12.

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9d269301f017657c3ae2e95a411317640acd39a8)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libswscale/tests/swscale.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index cb731f6211..19878a7877 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -312,22 +312,22 @@ static int fileTest(const uint8_t * const ref[4], int refStride[4],
     while (fgets(buf, sizeof(buf), fp)) {
         struct Results r;
         enum AVPixelFormat srcFormat;
-        char srcStr[13];
+        char srcStr[21];
         int srcW = 0, srcH = 0;
         enum AVPixelFormat dstFormat;
-        char dstStr[13];
+        char dstStr[21];
         int dstW = 0, dstH = 0;
         int flags;
         int ret;
 
         ret = sscanf(buf,
-                     " %12s %dx%d -> %12s %dx%d flags=%d CRC=%x"
+                     " %20s %dx%d -> %20s %dx%d flags=%d CRC=%x"
                      " SSD=%"SCNu64 ", %"SCNu64 ", %"SCNu64 ", %"SCNu64 "\n",
                      srcStr, &srcW, &srcH, dstStr, &dstW, &dstH,
                      &flags, &r.crc, &r.ssdY, &r.ssdU, &r.ssdV, &r.ssdA);
         if (ret != 12) {
             srcStr[0] = dstStr[0] = 0;
-            ret       = sscanf(buf, "%12s -> %12s\n", srcStr, dstStr);
+            ret       = sscanf(buf, "%20s -> %20s\n", srcStr, dstStr);
         }
 
         srcFormat = av_get_pix_fmt(srcStr);



More information about the ffmpeg-cvslog mailing list