From b17a026eb79ff3361c166e33f3bfdd57b572c286 Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Fri, 10 Apr 2015 14:07:35 +0300 Subject: [PATCH] codecparser: h265: Fix the NumDeltaPocs calculation Always use the equation provided in spec (7-57) for finding the NumDeltaPocs https://bugzilla.gnome.org/show_bug.cgi?id=747613 --- gst-libs/gst/codecparsers/gsth265parser.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c index fca3a26427..970e390127 100644 --- a/gst-libs/gst/codecparsers/gsth265parser.c +++ b/gst-libs/gst/codecparsers/gsth265parser.c @@ -747,9 +747,6 @@ gst_h265_parser_parse_short_term_ref_pic_sets (GstH265ShortTermRefPicSet * READ_UINT8 (nr, used_by_curr_pic_flag[j], 1); if (!used_by_curr_pic_flag[j]) READ_UINT8 (nr, use_delta_flag[j], 1); - - if (used_by_curr_pic_flag[j] || use_delta_flag[j]) - stRPS->NumDeltaPocs++; } /* 7-47: calcuate NumNegativePics, DeltaPocS0 and UsedByCurrPicS0 */ @@ -839,9 +836,11 @@ gst_h265_parser_parse_short_term_ref_pic_sets (GstH265ShortTermRefPicSet * } } - /* 7-57 */ - stRPS->NumDeltaPocs = stRPS->NumPositivePics + stRPS->NumNegativePics; } + + /* 7-57 */ + stRPS->NumDeltaPocs = stRPS->NumPositivePics + stRPS->NumNegativePics; + return TRUE; error: