mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 15:32:32 +00:00
gstavviddec: only set range when actually reported by avcodec
otherwise we get incomplete colorimetry that video-info complains about Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/70>
This commit is contained in:
parent
e727ce548c
commit
b1b49a0913
1 changed files with 3 additions and 1 deletions
|
@ -1259,8 +1259,10 @@ gst_ffmpegviddec_negotiate (GstFFMpegVidDec * ffmpegdec,
|
||||||
|| in_info->colorimetry.range == GST_VIDEO_COLOR_RANGE_UNKNOWN) {
|
|| in_info->colorimetry.range == GST_VIDEO_COLOR_RANGE_UNKNOWN) {
|
||||||
if (context->color_range == AVCOL_RANGE_JPEG) {
|
if (context->color_range == AVCOL_RANGE_JPEG) {
|
||||||
out_info->colorimetry.range = GST_VIDEO_COLOR_RANGE_0_255;
|
out_info->colorimetry.range = GST_VIDEO_COLOR_RANGE_0_255;
|
||||||
} else {
|
} else if (context->color_range == AVCOL_RANGE_MPEG) {
|
||||||
out_info->colorimetry.range = GST_VIDEO_COLOR_RANGE_16_235;
|
out_info->colorimetry.range = GST_VIDEO_COLOR_RANGE_16_235;
|
||||||
|
} else {
|
||||||
|
out_info->colorimetry.range = GST_VIDEO_COLOR_RANGE_UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue