nvdec: Rely on upstream's value for interlace-mode with hevc

The nvdec API doesn't seem to produce interlacing information with hevc
streams so rely on upstreams value for interlace-mode
This commit is contained in:
Matthew Waters 2018-11-20 04:09:52 -06:00 committed by Nicolas Dufresne
parent 88586b4149
commit 0842187e6e

View file

@ -694,10 +694,17 @@ handle_pending_frames (GstNvDec * nvdec)
vinfo = &state->info;
vinfo->fps_n = fps_n;
vinfo->fps_d = fps_d;
if (format->progressive_sequence)
if (format->progressive_sequence) {
vinfo->interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
else
/* nvdec doesn't seem to deal with interlacing with hevc so rely
* on upstream's value */
if (format->codec == cudaVideoCodec_HEVC) {
vinfo->interlace_mode = nvdec->input_state->info.interlace_mode;
}
} else {
vinfo->interlace_mode = GST_VIDEO_INTERLACE_MODE_MIXED;
}
GST_LOG_OBJECT (decoder,
"Reading colorimetry information full-range %d matrix %d transfer %d primaries %d",