[vlc-commits] dxva2: fix chroma pitch calculation

Rafaël Carré git at videolan.org
Tue Feb 14 06:11:33 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Tue Feb 14 00:04:43 2012 -0500| [608d2841d98e1f35b4d8145cd61c12042b839770] | committer: Rafaël Carré

dxva2: fix chroma pitch calculation
(cherry picked from commit fece3fcfffaca0bb13356c04010cb129f72a8b02)

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=608d2841d98e1f35b4d8145cd61c12042b839770
---

 modules/codec/avcodec/dxva2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index a46c0c3..6d47a41 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -434,7 +434,7 @@ static int Extract(vlc_va_t *external, picture_t *picture, AVFrame *ff)
     if (va->render == MAKEFOURCC('Y','V','1','2') ||
         va->render == MAKEFOURCC('I','M','C','3')) {
         bool imc3 = va->render == MAKEFOURCC('I','M','C','3');
-        size_t chroma_pitch = imc3 ? lock.Pitch : lock.Pitch / 2;
+        size_t chroma_pitch = imc3 ? lock.Pitch : (lock.Pitch / 2);
 
         size_t pitch[3] = {
             lock.Pitch,



More information about the vlc-commits mailing list