[vlc-commits] dxva2: fix chroma pitch calculation

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


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

dxva2: fix chroma pitch calculation

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

 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 af4cd99..15849c5 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -384,7 +384,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