[vlc-commits] codec: VideoToolbox: fix dequeue condition (fix #18198)

Francois Cartegnie git at videolan.org
Thu Apr 6 15:05:42 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr  6 15:04:20 2017 +0200| [f67294a0c6820f9005f75473af7e1560ed891c07] | committer: Francois Cartegnie

codec: VideoToolbox: fix dequeue condition (fix #18198)

breaks with zero sized dpb

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

 modules/codec/videotoolbox.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index ff75e3c..7e2d0ff 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -410,7 +410,7 @@ static void OnDecodedFrame(decoder_t *p_dec, frame_info_t *p_info)
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
     assert(p_info->p_picture);
-    while(p_info->b_flush || p_sys->i_pic_reorder == (p_sys->i_pic_reorder_max * 2))
+    while(p_info->b_flush || p_sys->i_pic_reorder >= (p_sys->i_pic_reorder_max * 2))
     {
         /* First check if DPB sizing was correct before removing one frame */
         if (p_sys->p_pic_reorder && !p_info->b_flush &&



More information about the vlc-commits mailing list