mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
videodecoder: only copy chroma_site when known
Only overwrite the chroma-site if we have a valid value in the reference format.
This commit is contained in:
parent
1fa70ac02d
commit
ecac298e4e
1 changed files with 2 additions and 1 deletions
|
@ -732,9 +732,10 @@ _new_output_state (GstVideoFormat fmt, guint width, guint height,
|
|||
/* Copy over extra fields from reference state */
|
||||
tgt->interlace_mode = ref->interlace_mode;
|
||||
tgt->flags = ref->flags;
|
||||
tgt->chroma_site = ref->chroma_site;
|
||||
/* only copy values that are not unknown so that we don't override the
|
||||
* defaults. subclasses should really fill these in when they know. */
|
||||
if (ref->chroma_site)
|
||||
tgt->chroma_site = ref->chroma_site;
|
||||
if (ref->colorimetry.range)
|
||||
tgt->colorimetry.range = ref->colorimetry.range;
|
||||
if (ref->colorimetry.matrix)
|
||||
|
|
Loading…
Reference in a new issue