Skip to content
Permalink
Browse files

libavcodec: mpeg12dec: fix broken decode with vaapi

There are (wrongly?) encoded input where the coded order of fields is
different from the one specified in extension header.
Without those flags, decoded output gets broken when vaapi is used.
See also in mpeg_mc_decode_init() for XvMC.
  • Loading branch information...
0p1pp1 authored and 0p1pp1 committed Sep 9, 2017
1 parent c71fc15 commit 311716da96fd203b28165ec1c4789ec46f46aaa7
Showing with 2 additions and 0 deletions.
  1. +2 −0 libavcodec/mpeg12dec.c
@@ -1327,6 +1327,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)

avctx->pix_fmt = mpeg_get_pixelformat(avctx);
setup_hwaccel_for_pixfmt(avctx);
if (avctx->hwaccel)
avctx->slice_flags |= SLICE_FLAG_CODED_ORDER | SLICE_FLAG_ALLOW_FIELD;

/* Quantization matrices may need reordering
* if DCT permutation is changed. */

0 comments on commit 311716d

Please sign in to comment.
You can’t perform that action at this time.