We don't use the extra reference, so let's just avoid the extra
ref/unref.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1238>
to_mark = gst_h264_dpb_get_short_ref_by_pic_num (priv->dpb, pic_num_x);
if (to_mark) {
to_mark->ref = FALSE;
- gst_h264_picture_unref (to_mark);
} else {
GST_WARNING_OBJECT (self, "Invalid short term ref pic num to unmark");
return FALSE;
if (to_mark) {
to_mark->long_term = TRUE;
to_mark->long_term_frame_idx = ref_pic_marking->long_term_frame_idx;
- gst_h264_picture_unref (to_mark);
} else {
GST_WARNING_OBJECT (self,
"Invalid short term ref pic num to mark as long ref");
*
* Find a short term reference picture which has matching picture number
*
- * Returns: (nullable) (transfer full): a #GstH264Picture
+ * Returns: (nullable) (transfer none): a #GstH264Picture
*/
GstH264Picture *
gst_h264_dpb_get_short_ref_by_pic_num (GstH264Dpb * dpb, gint pic_num)
g_array_index (dpb->pic_list, GstH264Picture *, i);
if (picture->ref && !picture->long_term && picture->pic_num == pic_num)
- return gst_h264_picture_ref (picture);
+ return picture;
}
GST_WARNING ("No short term reference picture for %d", pic_num);