[FFmpeg-devel] [PATCH] lavc/qsvenc: return error with zero output
Xiang, Haihao
haihao.xiang at intel.com
Tue Aug 15 11:15:44 EEST 2023
On Do, 2023-08-10 at 14:37 +0800, Xiang, Haihao wrote:
> From: Haihao Xiang <haihao.xiang at intel.com>
>
> Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
> ---
> 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 {
Will apply,
-Haihao
More information about the ffmpeg-devel
mailing list