]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/hevc.c
Merge commit '2383323661f3b8342b2c4d356fcfe8c5d1b045f8'
[ffmpeg] / libavcodec / hevc.c
index 36f147a392ea9a289f7ae4904f22a1c455bc4611..8deea097bc6b00737b40c0fccfa34e0bf8dbf3fb 100644 (file)
@@ -1571,7 +1571,7 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, ptrdiff_t dststride, AVF
 static void hevc_await_progress(HEVCContext *s, HEVCFrame *ref,
                                 const Mv *mv, int y0, int height)
 {
-    int y = (mv->y >> 2) + y0 + height + 9;
+    int y = FFMAX(0, (mv->y >> 2) + y0 + height + 9);
 
     if (s->threads_type == FF_THREAD_FRAME )
         ff_thread_await_progress(&ref->tf, y, 0);