lavc/qsvenc: fix the hard code of height aligment checking

Message ID 1522836011-4205-1-git-send-email-zhong.li@intel.com
State New
Headers show
Series
  • lavc/qsvenc: fix the hard code of height aligment checking
Related show

Commit Message

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

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index f6b1a0d..fc9ace4 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1048,7 +1048,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);