[vlc-commits] vdpau: fix inverted logic
Rémi Denis-Courmont
git at videolan.org
Tue Jul 16 20:59:41 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 16 21:25:01 2013 +0300| [e90f73585f0c3d415882c52c55e35a01be41f2cd] | committer: Rémi Denis-Courmont
vdpau: fix inverted logic
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e90f73585f0c3d415882c52c55e35a01be41f2cd
---
modules/hw/vdpau/chroma.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index c534a81..9d37b19 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -436,8 +436,12 @@ static picture_t *VideoPassthrough(filter_t *filter, picture_t *src)
if (psys->vdp != sys->vdp)
{
video_format_t fmt = src->format;
- fmt.i_chroma = (sys->chroma == VDP_CHROMA_TYPE_420)
- ? VLC_CODEC_UYVY : VLC_CODEC_NV12;
+ switch (sys->chroma)
+ {
+ case VDP_CHROMA_TYPE_420: fmt.i_chroma = VLC_CODEC_NV12; break;
+ case VDP_CHROMA_TYPE_422: fmt.i_chroma = VLC_CODEC_UYVY; break;
+ default: assert(0);
+ }
picture_t *pic = picture_NewFromFormat(&fmt);
if (unlikely(pic == NULL))
More information about the vlc-commits
mailing list