[FFmpeg-cvslog] lavc/qsvenc: return error with zero output

Haihao Xiang git at videolan.org
Thu Aug 17 08:04:26 EEST 2023


ffmpeg | branch: master | Haihao Xiang <haihao.xiang at intel.com> | Thu Aug 10 14:37:14 2023 +0800| [e0a5c35270c68d77d101e518901de5a9f002b451] | committer: Haihao Xiang

lavc/qsvenc: return error with zero output

Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0a5c35270c68d77d101e518901de5a9f002b451
---

 libavcodec/qsvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 7ff9d333a2..b3b7475b0f 100644
--- a/libavcodec/qsvenc.c
+++ b/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 {



More information about the ffmpeg-cvslog mailing list