*
* copyright (c) 2010 Laurent Aimar
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
void *ff_dxva2_get_surface(const Picture *picture)
{
- return picture->data[3];
+ return picture->f.data[3];
}
unsigned ff_dxva2_get_surface_index(const struct dxva_context *ctx,
return result;
}
-int ff_dxva2_common_end_frame(AVCodecContext *avctx, MpegEncContext *s,
+int ff_dxva2_common_end_frame(AVCodecContext *avctx, Picture *pic,
const void *pp, unsigned pp_size,
const void *qm, unsigned qm_size,
int (*commit_bs_si)(AVCodecContext *,
struct dxva_context *ctx = avctx->hwaccel_context;
unsigned buffer_count = 0;
DXVA2_DecodeBufferDesc buffer[4];
- DXVA2_DecodeExecuteParams exec;
+ DXVA2_DecodeExecuteParams exec = { 0 };
int result;
if (FAILED(IDirectXVideoDecoder_BeginFrame(ctx->decoder,
- ff_dxva2_get_surface(s->current_picture_ptr),
+ ff_dxva2_get_surface(pic),
NULL))) {
av_log(avctx, AV_LOG_ERROR, "Failed to begin frame\n");
return -1;
assert(buffer_count == 1 + (qm_size > 0) + 2);
- memset(&exec, 0, sizeof(exec));
exec.NumCompBuffers = buffer_count;
exec.pCompressedBuffers = buffer;
exec.pExtensionData = NULL;
result = -1;
}
- if (!result)
- ff_draw_horiz_band(s, 0, s->avctx->height);
return result;
}
-