]> granicus.if.org Git - handbrake/commitdiff
QSV: use B-frame workaround (DTS generation) for VFR/PFR too.
authorRodeo <tdskywalker@gmail.com>
Mon, 1 Jul 2013 00:32:45 +0000 (00:32 +0000)
committerRodeo <tdskywalker@gmail.com>
Mon, 1 Jul 2013 00:32:45 +0000 (00:32 +0000)
QSV's DTS generation fails on some VFR samples here.

git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/qsv@5626 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/enc_qsv.c

index 5d04e039f16a9d0d41a16c1948eed9c686fe4f13..431b3969bd3c07a89b43144dbdc36620b2bf792e 100644 (file)
@@ -635,8 +635,10 @@ int qsv_enc_init( av_qsv_context* qsv, hb_work_private_t * pv ){
     // sanitize
     pv->bfrm_delay = FFMAX(pv->bfrm_delay, 0);
     pv->bfrm_delay = FFMIN(pv->bfrm_delay, BFRM_DELAY_MAX);
-    // check whether we need to generate DTS ourselves (MSDK < 1.6)
-    if (pv->bfrm_delay && !(hb_qsv_info->capabilities & HB_QSV_CAP_MSDK_1_6))
+    // check whether we need to generate DTS ourselves (MSDK < 1.6 or VFR/PFR)
+    pv->bfrm_workaround = job->cfr != 1 || !(hb_qsv_info->capabilities &
+                                             HB_QSV_CAP_MSDK_1_6);
+    if (pv->bfrm_delay && pv->bfrm_workaround)
     {
         pv->bfrm_workaround = 1;
         pv->list_dts        = hb_list_init();