You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
swscale/format: add ff_fmt_clear()
Reset an SwsFormat to its fully unset/invalid state.
This commit is contained in:
@@ -85,6 +85,20 @@ typedef struct SwsFormat {
|
|||||||
SwsColor color;
|
SwsColor color;
|
||||||
} SwsFormat;
|
} SwsFormat;
|
||||||
|
|
||||||
|
static inline void ff_fmt_clear(SwsFormat *fmt)
|
||||||
|
{
|
||||||
|
*fmt = (SwsFormat) {
|
||||||
|
.format = AV_PIX_FMT_NONE,
|
||||||
|
.range = AVCOL_RANGE_UNSPECIFIED,
|
||||||
|
.csp = AVCOL_SPC_UNSPECIFIED,
|
||||||
|
.loc = AVCHROMA_LOC_UNSPECIFIED,
|
||||||
|
.color = {
|
||||||
|
.prim = AVCOL_PRI_UNSPECIFIED,
|
||||||
|
.trc = AVCOL_TRC_UNSPECIFIED,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function also sanitizes and strips the input data, removing irrelevant
|
* This function also sanitizes and strips the input data, removing irrelevant
|
||||||
* fields for certain formats.
|
* fields for certain formats.
|
||||||
|
|||||||
Reference in New Issue
Block a user