lavc/qsvenc: return error with zero output

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
pull/390/head
Haihao Xiang 1 year ago
parent a7f24d79b8
commit e0a5c35270
  1. 2
      libavcodec/qsvenc.c

@ -2584,7 +2584,7 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
pict_type = AV_PICTURE_TYPE_P;
else if (qpkt.bs->FrameType & MFX_FRAMETYPE_B || qpkt.bs->FrameType & MFX_FRAMETYPE_xB)
pict_type = AV_PICTURE_TYPE_B;
else if (qpkt.bs->FrameType == MFX_FRAMETYPE_UNKNOWN) {
else if (qpkt.bs->FrameType == MFX_FRAMETYPE_UNKNOWN && qpkt.bs->DataLength) {
pict_type = AV_PICTURE_TYPE_NONE;
av_log(avctx, AV_LOG_WARNING, "Unknown FrameType, set pict_type to AV_PICTURE_TYPE_NONE.\n");
} else {

Loading…
Cancel
Save