]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qsvdec_vc1.c
Merge commit '1b2412f50185447da4212f65f06e8d72a6daf06e'
[ffmpeg] / libavcodec / qsvdec_vc1.c
index a80fc83617a11c859a5b34e237369b64a5d0afcb..3311d90f0f5a1a984ad6a4ffce793822063a4ad7 100644 (file)
@@ -52,6 +52,12 @@ static int qsv_decode_frame(AVCodecContext *avctx, void *data,
     return ff_qsv_decode(avctx, &s->qsv, frame, got_frame, avpkt);
 }
 
+static void qsv_decode_flush(AVCodecContext *avctx)
+{
+    QSVVC1Context *s = avctx->priv_data;
+    ff_qsv_decode_reset(avctx, &s->qsv);
+}
+
 AVHWAccel ff_vc1_qsv_hwaccel = {
     .name           = "vc1_qsv",
     .type           = AVMEDIA_TYPE_VIDEO,
@@ -81,7 +87,7 @@ AVCodec ff_vc1_qsv_decoder = {
     .id             = AV_CODEC_ID_VC1,
     .init           = NULL,
     .decode         = qsv_decode_frame,
-    .flush          = NULL,
+    .flush          = qsv_decode_flush,
     .close          = qsv_decode_close,
     .capabilities   = AV_CODEC_CAP_DELAY,
     .priv_class     = &class,