]> git.sesse.net Git - ffmpeg/commitdiff
lavc/dxva2_h264: Fix incorrect assert statement.
authorMatt Oliver <protogonoi@gmail.com>
Wed, 16 Mar 2016 11:28:29 +0000 (22:28 +1100)
committerMatt Oliver <protogonoi@gmail.com>
Wed, 16 Mar 2016 11:30:56 +0000 (22:30 +1100)
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
libavcodec/dxva2_h264.c

index 61cce3ae2df144d4563a89114606b9875777c7c2..54f2b8094e5cc3e0c2b6ac98d6cd2da714dff2f2 100644 (file)
@@ -426,7 +426,12 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
         slice_data = ctx_pic->slice_long;
         slice_size = ctx_pic->slice_count * sizeof(*ctx_pic->slice_long);
     }
-    assert((bs->DataSize & 127) == 0);
+#if CONFIG_D3D11VA
+    assert((((D3D11_VIDEO_DECODER_BUFFER_DESC *)bs)->DataSize & 127) == 0);
+#endif
+#if CONFIG_DXVA2
+    assert((((DXVA2_DecodeBufferDesc *)bs)->DataSize & 127) == 0);
+#endif
     return ff_dxva2_commit_buffer(avctx, ctx, sc,
                                   type,
                                   slice_data, slice_size, mb_count);