vd_lavc: don't check required hwdec fields

This commit is contained in:
wm4 2013-12-04 20:58:06 +01:00
parent 9c2858f37f
commit 0afd121ae6
1 changed files with 3 additions and 4 deletions

View File

@ -403,13 +403,12 @@ static void init_avctx(struct dec_video *vd, const char *decoder,
ctx->pic = avcodec_alloc_frame();
#endif
if (ctx->hwdec && ctx->hwdec->allocate_image) {
if (ctx->hwdec) {
ctx->do_hw_dr1 = true;
avctx->thread_count = 1;
if (ctx->hwdec->image_formats)
avctx->get_format = get_format_hwdec;
avctx->get_format = get_format_hwdec;
setup_refcounting_hw(avctx);
if (ctx->hwdec->init && ctx->hwdec->init(ctx) < 0) {
if (ctx->hwdec->init(ctx) < 0) {
uninit_avctx(vd);
return;
}