summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2015-09-10 19:02:12 +0300
committerSebastian Dröge <sebastian@centricular.com>2015-09-10 21:12:30 +0200
commitfcd42b7d776309261d75d1d355c3854e828cf88e (patch)
tree71a416753c7d9003e9edac87fc7c710c47ff6568 /gst-libs
parent81435c88918e0178b8263af7dfc2984b7a8a0bd2 (diff)
downloadgstreamer-plugins-bad-fcd42b7d776309261d75d1d355c3854e828cf88e.tar.gz
codecparsers: h265: Fix the selection of Active Ref Pic Set
If short_term_ref_pic_set_sps_flag is FALSE, the ShortTermRefPicSet structure is supposed to derive from slice header. Which means, CurrRpsIdx is equal to num_short_term_ref_pic_sets. But the number of refpicsets communicated via sps header is only num_short_term_ref_pic_sets - 1. And we are using slice_header structure to reference the last entry, which is ShortTermRefPicSet[num_short_term_ref_pic_sets]. https://bugzilla.gnome.org/show_bug.cgi?id=754834
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gsth265parser.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c
index 3f07d1388..77a46105c 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.c
+++ b/gst-libs/gst/codecparsers/gsth265parser.c
@@ -1985,7 +1985,6 @@ gst_h265_parser_parse_slice_hdr (GstH265Parser * parser,
GstH265PPS *pps;
GstH265SPS *sps;
guint i;
- guint CurrRpsIdx = 0;
GstH265ShortTermRefPicSet *stRPS = NULL;
guint32 UsedByCurrPicLt[16];
guint32 PicSizeInCtbsY;
@@ -2150,10 +2149,10 @@ gst_h265_parser_parse_slice_hdr (GstH265Parser * parser,
/* calculate NumPocTotalCurr */
if (slice->short_term_ref_pic_set_sps_flag)
- CurrRpsIdx = slice->short_term_ref_pic_set_idx;
+ stRPS = &sps->short_term_ref_pic_set[slice->short_term_ref_pic_set_idx];
else
- CurrRpsIdx = sps->num_short_term_ref_pic_sets;
- stRPS = &sps->short_term_ref_pic_set[CurrRpsIdx];
+ stRPS = &slice->short_term_ref_pic_sets;
+
for (i = 0; i < stRPS->NumNegativePics; i++)
if (stRPS->UsedByCurrPicS0[i])
NumPocTotalCurr++;