mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
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:
parent
76411205c8
commit
c1b8802c71
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue