mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
swscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytes
Some formats use longer names than 12. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b8ed493061
commit
9d269301f0
@ -312,22 +312,22 @@ static int fileTest(const uint8_t * const ref[4], int refStride[4],
|
|||||||
while (fgets(buf, sizeof(buf), fp)) {
|
while (fgets(buf, sizeof(buf), fp)) {
|
||||||
struct Results r;
|
struct Results r;
|
||||||
enum AVPixelFormat srcFormat;
|
enum AVPixelFormat srcFormat;
|
||||||
char srcStr[13];
|
char srcStr[21];
|
||||||
int srcW = 0, srcH = 0;
|
int srcW = 0, srcH = 0;
|
||||||
enum AVPixelFormat dstFormat;
|
enum AVPixelFormat dstFormat;
|
||||||
char dstStr[13];
|
char dstStr[21];
|
||||||
int dstW = 0, dstH = 0;
|
int dstW = 0, dstH = 0;
|
||||||
int flags;
|
int flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = sscanf(buf,
|
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",
|
" SSD=%"SCNu64 ", %"SCNu64 ", %"SCNu64 ", %"SCNu64 "\n",
|
||||||
srcStr, &srcW, &srcH, dstStr, &dstW, &dstH,
|
srcStr, &srcW, &srcH, dstStr, &dstW, &dstH,
|
||||||
&flags, &r.crc, &r.ssdY, &r.ssdU, &r.ssdV, &r.ssdA);
|
&flags, &r.crc, &r.ssdY, &r.ssdU, &r.ssdV, &r.ssdA);
|
||||||
if (ret != 12) {
|
if (ret != 12) {
|
||||||
srcStr[0] = dstStr[0] = 0;
|
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);
|
srcFormat = av_get_pix_fmt(srcStr);
|
||||||
|
Loading…
Reference in New Issue
Block a user