codecs: h264picture: use g_array_remove_index_fast()

This algorithm is faster than the normal one. The problem is it
disorders the elements in the dpb, but it does not seem to mess
decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1378>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-06-14 20:47:46 +02:00 committed by GStreamer Merge Bot
parent 76411205c8
commit c1b8802c71

View file

@ -227,7 +227,7 @@ gst_h264_dpb_delete_unused (GstH264Dpb * dpb)
if (picture->outputted && !picture->ref) {
GST_TRACE ("remove picture %p (frame num %d) from dpb",
picture, picture->frame_num);
g_array_remove_index (dpb->pic_list, i);
g_array_remove_index_fast (dpb->pic_list, i);
i--;
}
}
@ -255,7 +255,7 @@ gst_h264_dpb_delete_by_poc (GstH264Dpb * dpb, gint poc)
GST_TRACE ("remove picture %p for poc %d (frame num %d) from dpb",
picture, poc, picture->frame_num);
g_array_remove_index (dpb->pic_list, i);
g_array_remove_index_fast (dpb->pic_list, i);
return;
}
}