summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index a2f1d7d494..25049aa341 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -818,13 +818,7 @@ static enum AVPixelFormat get_format_hwdec(struct AVCodecContext *avctx,
if (select == AV_PIX_FMT_NONE) {
ctx->hwdec_failed = true;
- for (int i = 0; fmt[i] != AV_PIX_FMT_NONE; i++) {
- const AVPixFmtDescriptor *d = av_pix_fmt_desc_get(fmt[i]);
- if (d && !(d->flags & AV_PIX_FMT_FLAG_HWACCEL)) {
- select = fmt[i];
- break;
- }
- }
+ select = avcodec_default_get_format(avctx, fmt);
}
const char *name = av_get_pix_fmt_name(select);