Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-11-05 14:33:50 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2012-11-05 14:33:50 +0400
commit60e597af6ceb823c7fcaaa6041e390fddf534659 (patch)
treebcd29e12411a36e374ee7a2a7997cd01137e5eaa /decoder/LAVVideo
parent2840ba3d532e9ebcfd03b3a0297f191330112bbf (diff)
Enable DVD support for QuickSync
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r--decoder/LAVVideo/decoders/quicksync.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/decoder/LAVVideo/decoders/quicksync.cpp b/decoder/LAVVideo/decoders/quicksync.cpp
index 14ea00cf..2443a98b 100644
--- a/decoder/LAVVideo/decoders/quicksync.cpp
+++ b/decoder/LAVVideo/decoders/quicksync.cpp
@@ -229,10 +229,6 @@ STDMETHODIMP CDecQuickSync::InitDecoder(AVCodecID codec, const CMediaType *pmt)
DestroyDecoder(false);
- // QuickSync has no DVD support (yet)
- if (pmt->majortype == MEDIATYPE_DVD_ENCRYPTED_PACK || pmt->majortype == MEDIATYPE_MPEG2_PACK || pmt->majortype == MEDIATYPE_MPEG2_PES)
- return E_FAIL;
-
FOURCC fourCC = (FOURCC)0;
for (int i = 0; i < countof(quicksync_codecs); i++) {
if (quicksync_codecs[i].ffcodec == codec) {
@@ -323,6 +319,9 @@ STDMETHODIMP CDecQuickSync::InitDecoder(AVCodecID codec, const CMediaType *pmt)
// Disallow software fallback
qsConfig.bEnableSwEmulation = false;
+ // Enable DVD support
+ qsConfig.bEnableDvdDecoding = true;
+
// We want the pure image, no mod-16 padding
qsConfig.bMod16Width = false;
@@ -354,7 +353,7 @@ STDMETHODIMP CDecQuickSync::InitDecoder(AVCodecID codec, const CMediaType *pmt)
// We usually do not trust the media type information and instead scan the bitstream.
// This ensures that we only ever send valid and supported data to the decoder,
// so with this we try to circumvent the checks in the QuickSync decoder
- mt.SetType(&MEDIATYPE_Video);
+ mt.SetType(m_pCallback->GetDecodeFlags() & LAV_VIDEO_DEC_FLAG_DVD ? &MEDIATYPE_DVD_ENCRYPTED_PACK : &MEDIATYPE_Video);
MPEG2VIDEOINFO *mp2vi = (*mt.FormatType() == FORMAT_MPEG2Video) ? (MPEG2VIDEOINFO *)mt.Format() : NULL;
BITMAPINFOHEADER *bmi = NULL;
videoFormatTypeHandler(mt.Format(), mt.FormatType(), &bmi);