From: Hendrik Leppkes <[email protected]>

The MBAFF flag may only be signaled if we're actually dealing with
a full frame, and not singular fields, as it can happen in mixed content.
---
 libavcodec/dxva2_h264.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index ffe71a9..5cdf5de 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -93,7 +93,8 @@ static void fill_picture_parameters(struct dxva_context *ctx, 
const H264Context
     pp->num_ref_frames                = h->sps.ref_frame_count;
 
     pp->wBitFields                    = ((s->picture_structure != PICT_FRAME) 
<<  0) |
-                                        (h->sps.mb_aff                        
<<  1) |
+                                        ((h->sps.mb_aff &&
+                                        (s->picture_structure == PICT_FRAME)) 
<<  1) |
                                         (h->sps.residual_color_transform_flag 
<<  2) |
                                         /* sp_for_switch_flag (not implemented 
by Libav) */
                                         (0                                    
<<  3) |
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to