[FFmpeg-devel] [PATCH] ffmpeg_dxva2: set AVFrame.data[0] to the surface pointer as well

Hendrik Leppkes h.leppkes at gmail.com
Thu Oct 15 13:29:29 CEST 2015


Some decoders specifically test if data[0] is set to check if a frame is
valid. This allows these checks to pass and decoding to continue.
---
 ffmpeg_dxva2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ffmpeg_dxva2.c b/ffmpeg_dxva2.c
index 905bf89..8641a0d 100644
--- a/ffmpeg_dxva2.c
+++ b/ffmpeg_dxva2.c
@@ -248,6 +248,7 @@ static int dxva2_get_buffer(AVCodecContext *s, AVFrame *frame, int flags)
     ctx->surface_infos[i].used = 1;
     ctx->surface_infos[i].age  = ctx->surface_age++;
 
+    frame->data[0] =
     frame->data[3] = (uint8_t *)surface;
 
     return 0;
-- 
2.5.3.windows.1



More information about the ffmpeg-devel mailing list