Skip to content

Commit 698d861

Browse files
committed
qsvdec: set complete_frame flags for non-interlaced frames.
This can fix vc1 decoding segment fault issues. See: ./ffmpeg -hwaccel qsv -c:v vc1_qsv -i /fate-suite/vc1/SA00040.vc1 -vf "hwdownload, format=nv12" -f rawvideo /dev/null Signed-off-by: Zhong Li <zhong.li@intel.com>
1 parent 3cc8fa1 commit 698d861

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libavcodec/qsvdec.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
310310
bs.DataLength = avpkt->size;
311311
bs.MaxLength = bs.DataLength;
312312
bs.TimeStamp = avpkt->pts;
313+
if (avctx->field_order == AV_FIELD_UNKNOWN ||
314+
avctx->field_order == AV_FIELD_PROGRESSIVE)
315+
bs.DataFlag |= MFX_BITSTREAM_COMPLETE_FRAME;
313316
}
314317

315318
sync = av_mallocz(sizeof(*sync));

0 commit comments

Comments
 (0)