diff mbox

[FFmpeg-devel] lavc/qsvenc: fix the hard code of height aligment checking

Message ID 1522836478-4907-2-git-send-email-zhong.li@intel.com
State New
Headers show

Commit Message

Zhong Li April 4, 2018, 10:07 a.m. UTC
Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavcodec/qsvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index afb953e..573c11e 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1051,7 +1051,7 @@  static int submit_frame(QSVEncContext *q, const AVFrame *frame,
         }
     } else {
         /* make a copy if the input is not padded as libmfx requires */
-        if (frame->height & 31 || frame->linesize[0] & (q->width_align - 1)) {
+        if (frame->height & (q->height_align - 1) || frame->linesize[0] & (q->width_align - 1)) {
             qf->frame->height = FFALIGN(frame->height, q->height_align);
             qf->frame->width  = FFALIGN(frame->width, q->width_align);