summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecs/gsth264decoder.c1
-rw-r--r--gst-libs/gst/codecs/gsth264picture.c10
-rw-r--r--gst-libs/gst/codecs/gsth264picture.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/gst-libs/gst/codecs/gsth264decoder.c b/gst-libs/gst/codecs/gsth264decoder.c
index 189ed2620..da70095a6 100644
--- a/gst-libs/gst/codecs/gsth264decoder.c
+++ b/gst-libs/gst/codecs/gsth264decoder.c
@@ -2199,6 +2199,7 @@ gst_h264_decoder_init_gap_picture (GstH264Decoder * self,
picture->frame_num = picture->pic_num = frame_num;
picture->dec_ref_pic_marking.adaptive_ref_pic_marking_mode_flag = FALSE;
picture->ref = GST_H264_PICTURE_REF_SHORT_TERM;
+ picture->ref_pic = TRUE;
picture->dec_ref_pic_marking.long_term_reference_flag = FALSE;
picture->field = GST_H264_PICTURE_FIELD_FRAME;
diff --git a/gst-libs/gst/codecs/gsth264picture.c b/gst-libs/gst/codecs/gsth264picture.c
index e7bf8c687..417986c62 100644
--- a/gst-libs/gst/codecs/gsth264picture.c
+++ b/gst-libs/gst/codecs/gsth264picture.c
@@ -707,7 +707,7 @@ gst_h264_dpb_needs_bump (GstH264Dpb * dpb, GstH264Picture * to_insert,
return FALSE;
}
- if (to_insert->ref != GST_H264_PICTURE_REF_NONE) {
+ if (to_insert->ref_pic) {
GST_TRACE ("No empty frame buffer for ref frame, need bumping.");
return TRUE;
}
@@ -1055,7 +1055,13 @@ gst_h264_picture_set_reference (GstH264Picture * picture,
g_return_if_fail (picture != NULL);
picture->ref = reference;
+ if (reference > GST_H264_PICTURE_REF_NONE)
+ picture->ref_pic = TRUE;
- if (other_field && picture->other_field)
+ if (other_field && picture->other_field) {
picture->other_field->ref = reference;
+
+ if (reference > GST_H264_PICTURE_REF_NONE)
+ picture->other_field->ref_pic = TRUE;
+ }
}
diff --git a/gst-libs/gst/codecs/gsth264picture.h b/gst-libs/gst/codecs/gsth264picture.h
index 4e9a7a0b8..962ed5e66 100644
--- a/gst-libs/gst/codecs/gsth264picture.h
+++ b/gst-libs/gst/codecs/gsth264picture.h
@@ -143,6 +143,8 @@ struct _GstH264Picture
gboolean idr;
gint idr_pic_id;
GstH264PictureReference ref;
+ /* Whether a reference picture. */
+ gboolean ref_pic;
gboolean needed_for_output;
gboolean mem_mgmt_5;