Commit fe84f6ec authored by Felix Paul Kühne's avatar Felix Paul Kühne

videotoolbox: add missing sanity check

parent 890f8e0f
...@@ -448,12 +448,14 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) ...@@ -448,12 +448,14 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
p_sys->b_enable_temporal_processing = false; p_sys->b_enable_temporal_processing = false;
if (var_InheritInteger(p_dec, "videotoolbox-temporal-deinterlacing")) { if (var_InheritInteger(p_dec, "videotoolbox-temporal-deinterlacing")) {
if (p_block->i_flags & BLOCK_FLAG_TOP_FIELD_FIRST || if (p_block != NULL) {
p_block->i_flags & BLOCK_FLAG_BOTTOM_FIELD_FIRST) { if (p_block->i_flags & BLOCK_FLAG_TOP_FIELD_FIRST ||
msg_Dbg(p_dec, "Interlaced content detected, inserting temporal deinterlacer"); p_block->i_flags & BLOCK_FLAG_BOTTOM_FIELD_FIRST) {
CFDictionarySetValue(decoderConfiguration, kVTDecompressionPropertyKey_FieldMode, kVTDecompressionProperty_FieldMode_DeinterlaceFields); msg_Dbg(p_dec, "Interlaced content detected, inserting temporal deinterlacer");
CFDictionarySetValue(decoderConfiguration, kVTDecompressionPropertyKey_DeinterlaceMode, kVTDecompressionProperty_DeinterlaceMode_Temporal); CFDictionarySetValue(decoderConfiguration, kVTDecompressionPropertyKey_FieldMode, kVTDecompressionProperty_FieldMode_DeinterlaceFields);
p_sys->b_enable_temporal_processing = true; CFDictionarySetValue(decoderConfiguration, kVTDecompressionPropertyKey_DeinterlaceMode, kVTDecompressionProperty_DeinterlaceMode_Temporal);
p_sys->b_enable_temporal_processing = true;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment