[vlc-commits] dxva2: store the pixel format in the video context

Steve Lhomme git at videolan.org
Fri Oct 25 11:11:25 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul 23 09:17:19 2019 +0200| [1e8dfd7e044973a04c862aff0efc125afe9d6a3b] | committer: Steve Lhomme

dxva2: store the pixel format in the video context

So other modules can be initialized from this source.

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

 modules/codec/avcodec/dxva2.c   | 2 ++
 modules/video_chroma/d3d9_fmt.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 503eb1f5a6..927a2a6d7b 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -338,6 +338,8 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *des
                     DxgiVendorStr(d3dai.VendorId), d3dai.VendorId, d3dai.DeviceId, d3dai.Revision);
     }
 
+    octx->format = sys->render;
+
     va->ops = &ops;
     *vtcx_out = sys->vctx;
     return VLC_SUCCESS;
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index e6d0bd5bec..a04f8956e3 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -79,6 +79,7 @@ typedef struct
 typedef struct
 {
     IDirect3DDevice9 *dev;
+    D3DFORMAT        format;
 } d3d9_video_context_t;
 
 static inline bool is_d3d9_opaque(vlc_fourcc_t chroma)



More information about the vlc-commits mailing list