예제 #1
0
int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
{
    OSStatus status = kVDADecoderNoErr;

    if (vda_ctx->decoder)
        status = VDADecoderDestroy(vda_ctx->decoder);

#if FF_API_VDA_ASYNC
    vda_clear_queue(vda_ctx);
    pthread_mutex_destroy(&vda_ctx->queue_mutex);
#endif
    av_freep(&vda_ctx->priv_bitstream);

    return status;
}
예제 #2
0
파일: vda.c 프로젝트: KindDragon/FFmpeg
int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
{
    OSStatus status = kVDADecoderNoErr;

    if (vda_ctx->decoder)
        status = VDADecoderDestroy(vda_ctx->decoder);

    vda_clear_queue(vda_ctx);

    pthread_mutex_destroy(&vda_ctx->queue_mutex);

    if (vda_ctx->bitstream)
        av_freep(&vda_ctx->bitstream);

    if (kVDADecoderNoErr != status)
        return status;

    return 0;
}