You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/vf_colorspace: strip color volume metadata
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/csp.h"
|
#include "libavutil/csp.h"
|
||||||
|
#include "libavutil/frame.h"
|
||||||
#include "libavutil/mem.h"
|
#include "libavutil/mem.h"
|
||||||
#include "libavutil/mem_internal.h"
|
#include "libavutil/mem_internal.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
@@ -750,6 +751,12 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
|
|||||||
} else {
|
} else {
|
||||||
out->color_trc = s->user_trc;
|
out->color_trc = s->user_trc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (out->color_primaries != in->color_primaries || out->color_trc != in->color_trc) {
|
||||||
|
av_frame_side_data_remove_by_props(&out->side_data, &out->nb_side_data,
|
||||||
|
AV_SIDE_DATA_PROP_COLOR_DEPENDENT);
|
||||||
|
}
|
||||||
|
|
||||||
if (rgb_sz != s->rgb_sz) {
|
if (rgb_sz != s->rgb_sz) {
|
||||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(out->format);
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(out->format);
|
||||||
int uvw = in->width >> desc->log2_chroma_w;
|
int uvw = in->width >> desc->log2_chroma_w;
|
||||||
|
Reference in New Issue
Block a user