diff options
Diffstat (limited to 'libavcodec/dxva2_mpeg2.c')
-rw-r--r-- | libavcodec/dxva2_mpeg2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c index f6ef5e52ab..65624e3ec6 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -156,14 +156,17 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, s->current_picture_ptr->hwaccel_picture_private; const int is_field = s->picture_structure != PICT_FRAME; const unsigned mb_count = s->mb_width * (s->mb_height >> is_field); + void *dxva_data_ptr; uint8_t *dxva_data, *current, *end; unsigned dxva_size; unsigned i; if (FAILED(IDirectXVideoDecoder_GetBuffer(ctx->decoder, DXVA2_BitStreamDateBufferType, - &dxva_data, &dxva_size))) + &dxva_data_ptr, &dxva_size))) return -1; + + dxva_data = dxva_data_ptr; current = dxva_data; end = dxva_data + dxva_size; |