mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/drawutils: ban XYZ formats
These are not supported by the drawing functions at all, and were incorrectly advertised as supported in the past. Note: This check is added only to separate the logic change from the API change in the following commit, and will be removed again after it becomes redundant.
This commit is contained in:
parent
55f28eb627
commit
96dfc4481b
|
@ -22,6 +22,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/avstring.h"
|
||||
#include "libavutil/avutil.h"
|
||||
#include "libavutil/csp.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
|
@ -93,6 +94,8 @@ int ff_draw_init2(FFDrawContext *draw, enum AVPixelFormat format, enum AVColorSp
|
|||
return AVERROR(ENOSYS);
|
||||
if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
|
||||
return AVERROR(ENOSYS);
|
||||
if (av_strstart(desc->name, "xyz", NULL))
|
||||
return AVERROR(ENOSYS);
|
||||
if (csp == AVCOL_SPC_UNSPECIFIED)
|
||||
csp = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? AVCOL_SPC_RGB : AVCOL_SPC_SMPTE170M;
|
||||
if (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && !(luma = av_csp_luma_coeffs_from_avcsp(csp)))
|
||||
|
|
|
@ -43,7 +43,6 @@ rgb48le ed08db9b1aa50d69b8c3d73db93e390e
|
|||
rgba b157c90191463d34fb3ce77b36c96386
|
||||
vuya 44368c0a758ee68e24ce976e3b1b8535
|
||||
vuyx bc7c4f693a22cd1ac95e33d473086474
|
||||
xyz12le 23dadbbba70b2925ce75fb8ba8080ba3
|
||||
ya16le 8dbfcb586abf626da7d1aca887a581b9
|
||||
ya8 495daaca2dcb4f7aeba7652768b41ced
|
||||
yuv410p cb871dcc1e84a7ef1d21f9237b88cf6e
|
||||
|
|
Loading…
Reference in New Issue