mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
swscale/tests/swscale: don't bail on ENOTSUP in auxiliary conversions
Somebody thought it was a good idea to implement XYZ<->XYZ but not XYZ<->YUV, so for an xyz -> xyz conversion, the main check succeeds while just the auxiliary conversions fail. Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
1 parent
afe68aaaa6
commit
60c8273b35
1 file changed
+3
-4
@@ -618,11 +618,8 @@ static int run_test(enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt,
|
||||
ret = (opts->api == IMPL_LEGACY) ? scale_legacy(dst, src, mode, opts, &r.time)
|
||||
: hw_device_ctx ? scale_hw(dst, src, mode, opts, &r.time)
|
||||
: scale_new(dst, src, mode, opts, &r.time);
|
||||
if (ret < 0) {
|
||||
if (ret == AVERROR(ENOTSUP))
|
||||
ret = 0;
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = init_frame(&out, ref, ref->width, ref->height, ref->format);
|
||||
if (ret < 0)
|
||||
@@ -670,6 +667,8 @@ bad_loss:
|
||||
error:
|
||||
av_frame_free(&dst);
|
||||
av_frame_free(&out);
|
||||
if (ret == AVERROR(ENOTSUP))
|
||||
ret = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user