From a4a6332a90b21eb246b5147dc3285b36cd6f631e Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 9 Dec 2016 08:57:34 -0800 Subject: [PATCH] qsv: fix more compiler warnings --- libhb/fifo.c | 2 +- libhb/qsv_filter_pp.c | 5 ++--- libhb/qsv_libav.c | 4 ++-- libhb/qsv_libav.h | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libhb/fifo.c b/libhb/fifo.c index 5ec49bf86..a07545ed5 100644 --- a/libhb/fifo.c +++ b/libhb/fifo.c @@ -740,7 +740,7 @@ void hb_buffer_close( hb_buffer_t ** _b ) } } av_qsv_flush_stages(b->qsv_details.ctx->pipes, - &b->qsv_details.qsv_atom); + (av_qsv_list**)&b->qsv_details.qsv_atom); } #endif diff --git a/libhb/qsv_filter_pp.c b/libhb/qsv_filter_pp.c index 05b18bf7e..207c92a79 100644 --- a/libhb/qsv_filter_pp.c +++ b/libhb/qsv_filter_pp.c @@ -336,7 +336,7 @@ int pre_process_frame(hb_buffer_t *in, av_qsv_context* qsv, hb_filter_private_t break; } - sts = MFXVideoUSER_ProcessFrameAsync(qsv->mfx_session, &work_surface, 1, &qsv_vpp->p_surfaces[surface_idx] , 1, qsv_vpp->p_syncp[sync_idx]->p_sync); + sts = MFXVideoUSER_ProcessFrameAsync(qsv->mfx_session, (void * const*)&work_surface, 1, (void * const*)&qsv_vpp->p_surfaces[surface_idx] , 1, qsv_vpp->p_syncp[sync_idx]->p_sync); if (MFX_ERR_MORE_DATA == sts) { @@ -504,7 +504,7 @@ static void hb_qsv_filter_pre_close( hb_filter_object_t * filter ){ if(pv->qsv_user && qsv->mfx_session){ sts=MFXVideoUSER_Unregister(qsv->mfx_session,0); - AV_QSV_CHECK_RESULT(sts, MFX_ERR_NONE, sts); + AV_QSV_CHECK_RET(sts, MFX_ERR_NONE, sts); for(i=hb_list_count(pv->qsv_user);i>0;i--){ qsv_filter_t *plugin = hb_list_item(pv->qsv_user,i-1); @@ -713,7 +713,6 @@ mfxStatus MFX_CDECL qsv_Execute(mfxHDL pthis, mfxThreadTask task, mfxU32 uid_p, mfxStatus sts = MFX_ERR_NONE; qsv_filter_task_t *current_task = (qsv_filter_task_t *)task; - qsv_filter_t *plugin = pthis; sts = (current_task->processor.process)(current_task,0); AV_QSV_CHECK_RESULT(sts, MFX_ERR_NONE, sts); diff --git a/libhb/qsv_libav.c b/libhb/qsv_libav.c index 0222be9c7..f439c0ffe 100644 --- a/libhb/qsv_libav.c +++ b/libhb/qsv_libav.c @@ -108,7 +108,7 @@ int av_qsv_get_free_surface(av_qsv_space * space, av_qsv_context * qsv, int ff_qsv_is_surface_in_pipe(mfxFrameSurface1 * p_surface, av_qsv_context * qsv) { int ret = 0; - int a, b,i; + int a, b; av_qsv_list *list = 0; av_qsv_stage *stage = 0; @@ -599,7 +599,7 @@ void av_qsv_wait_on_sync(av_qsv_context *qsv, av_qsv_stage *stage) av_qsv_sleep(10); continue; } - AV_QSV_CHECK_RESULT(sts, MFX_ERR_NONE, sts); + AV_QSV_CHECK_RET(sts, MFX_ERR_NONE, sts); break; } } diff --git a/libhb/qsv_libav.h b/libhb/qsv_libav.h index 3a1ebf7bf..779571022 100644 --- a/libhb/qsv_libav.h +++ b/libhb/qsv_libav.h @@ -150,6 +150,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AV_QSV_DEBUG_ASSERT(x,y) { if ((x)) { fprintf(stderr, "\nASSERT: %s\n", y); } } #endif +#define AV_QSV_CHECK_RET(P, X, ERR) {if ((X) > (P)) {AV_QSV_PRINT_RET_MSG(ERR); return;}} #define AV_QSV_CHECK_RESULT(P, X, ERR) {if ((X) > (P)) {AV_QSV_PRINT_RET_MSG(ERR); return ERR;}} #define AV_QSV_CHECK_POINTER(P, ERR) {if (!(P)) {AV_QSV_PRINT_RET_MSG(ERR); return ERR;}} #define AV_QSV_IGNORE_MFX_STS(P, X) {if ((X) == (P)) {P = MFX_ERR_NONE;}} -- 2.40.0