codecs: h264decoder: Fix missing drain handling in bumping

Should've included in the commit 5527cc4a2e

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1783>
This commit is contained in:
Seungha Yang 2020-11-09 23:22:09 +09:00 committed by GStreamer Merge Bot
parent 64c1218948
commit 5342b05390

View file

@ -675,7 +675,7 @@ gst_h264_dpb_bump (GstH264Dpb * dpb, gboolean drain)
/* NOTE: don't use g_array_remove_index_fast here since the last picture
* need to be referenced for bumping decision */
if (!picture->ref)
if (!picture->ref || drain)
g_array_remove_index (dpb->pic_list, index);
dpb->last_output_poc = picture->pic_order_cnt;