diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-31 14:24:10 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-04-01 00:10:15 +0200 |
commit | 678e455f1dc09265464b13d936d9fda62bc2bf43 (patch) | |
tree | 613a3991d62c69b46712610ec1c1e551420d450f /libavcodec/dxva2.c | |
parent | f94371b1db89bf65173a763a49175ce549466602 (diff) | |
download | ffmpeg-678e455f1dc09265464b13d936d9fda62bc2bf43.tar.gz |
dxva2: Directly use AVFrames
The assumption of (MPEG) Picture and H264Picture layout matching might
not hold true in the future.
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/dxva2.c')
-rw-r--r-- | libavcodec/dxva2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c index 6d4550cdce..9ee22c8d56 100644 --- a/libavcodec/dxva2.c +++ b/libavcodec/dxva2.c @@ -30,15 +30,15 @@ #include "mpegvideo.h" #include "dxva2_internal.h" -void *ff_dxva2_get_surface(const Picture *picture) +void *ff_dxva2_get_surface(const AVFrame *frame) { - return picture->f.data[3]; + return frame->data[3]; } unsigned ff_dxva2_get_surface_index(const struct dxva_context *ctx, - const Picture *picture) + const AVFrame *frame) { - void *surface = ff_dxva2_get_surface(picture); + void *surface = ff_dxva2_get_surface(frame); unsigned i; for (i = 0; i < ctx->surface_count; i++) @@ -91,7 +91,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx, return result; } -int ff_dxva2_common_end_frame(AVCodecContext *avctx, Picture *pic, +int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame, const void *pp, unsigned pp_size, const void *qm, unsigned qm_size, int (*commit_bs_si)(AVCodecContext *, @@ -107,7 +107,7 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, Picture *pic, do { hr = IDirectXVideoDecoder_BeginFrame(ctx->decoder, - ff_dxva2_get_surface(pic), + ff_dxva2_get_surface(frame), NULL); if (hr == E_PENDING) av_usleep(2000); |