diff options
author | Clément Bœsch <u@pkh.me> | 2017-03-24 00:51:32 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-07-30 16:05:32 +0200 |
commit | 4158fba3cdb7c90f42071323f37f617e4f278414 (patch) | |
tree | 469877d2f4565aca569c06c8582bd9ddbd62dc71 /libswscale/tests | |
parent | d2c70fc8879024565f4a6397d0230bffdc0afb15 (diff) | |
download | ffmpeg-streaming-4158fba3cdb7c90f42071323f37f617e4f278414.zip ffmpeg-streaming-4158fba3cdb7c90f42071323f37f617e4f278414.tar.gz |
sws/tests/pixdesc_query: replace rgb based pix fmts with endianess agnostic names
Fixes ticket #6554
Diffstat (limited to 'libswscale/tests')
-rw-r--r-- | libswscale/tests/pixdesc_query.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libswscale/tests/pixdesc_query.c b/libswscale/tests/pixdesc_query.c index a0c8437..417f481 100644 --- a/libswscale/tests/pixdesc_query.c +++ b/libswscale/tests/pixdesc_query.c @@ -64,8 +64,15 @@ int main(void) while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) { enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc); - if (query_tab[i].cond(pix_fmt)) - av_dynarray_add(&pix_fmts, &nb_pix_fmts, (void *)pix_desc->name); + if (query_tab[i].cond(pix_fmt)) { + const char *pix_name = pix_desc->name; + if (pix_fmt == AV_PIX_FMT_RGB32) pix_name = "rgb32"; + else if (pix_fmt == AV_PIX_FMT_RGB32_1) pix_name = "rgb32_1"; + else if (pix_fmt == AV_PIX_FMT_BGR32) pix_name = "bgr32"; + else if (pix_fmt == AV_PIX_FMT_BGR32_1) pix_name = "bgr32_1"; + + av_dynarray_add(&pix_fmts, &nb_pix_fmts, (void *)pix_name); + } } if (pix_fmts) { |