diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-03-16 13:12:59 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-03-16 13:14:24 +0100 |
commit | c198295dedd5ef8e864c2794bf90c27848f23140 (patch) | |
tree | 5d2cdd4129a0b2e12adbf9731d619ce8491cece6 /libavcodec/dxva2_h264.c | |
parent | c43d4858119e79db0c24f673bcbf20eb3870b307 (diff) | |
download | ffmpeg-streaming-c198295dedd5ef8e864c2794bf90c27848f23140.zip ffmpeg-streaming-c198295dedd5ef8e864c2794bf90c27848f23140.tar.gz |
dxva2_h264: fix size alignment asserts
Convert them to av_assert0 in the process
Diffstat (limited to 'libavcodec/dxva2_h264.c')
-rw-r--r-- | libavcodec/dxva2_h264.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 54f2b80..23cc9b1 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/avassert.h" + #include "h264.h" #include "h264data.h" #include "mpegutils.h" @@ -405,6 +407,8 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, dsc11->NumMBsInBuffer = mb_count; type = D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL; + + av_assert0((dsc11->DataSize & 127) == 0); } #endif #if CONFIG_DXVA2 @@ -416,6 +420,8 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, dsc2->NumMBsInBuffer = mb_count; type = DXVA2_SliceControlBufferType; + + av_assert0((dsc2->DataSize & 127) == 0); } #endif @@ -426,12 +432,6 @@ 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); } -#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); |