[FFmpeg-cvslog] avformat: Fix bug in parse_rps for HEVC.

Deliang Fu git at videolan.org
Mon Jul 20 10:48:17 CEST 2015


ffmpeg | branch: release/2.6 | Deliang Fu <agoalster at gmail.com> | Wed Jun 10 12:30:46 2015 +0800| [35e46e74bc2483f3898cf191a26435cd3ddfb086] | committer: Michael Niedermayer

avformat: Fix bug in parse_rps for HEVC.

Make the logic in libavformat/hevc.c parse_rps align with libavcodec/hevc_ps.c ff_hevc_decode_short_term_rps

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 6e1f8780c833ef55815111d4771b95ff78567cdb)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35e46e74bc2483f3898cf191a26435cd3ddfb086
---

 libavformat/hevc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index c92e9eb..32192ba 100644
--- a/libavformat/hevc.c
+++ b/libavformat/hevc.c
@@ -449,7 +449,7 @@ static int parse_rps(GetBitContext *gb, unsigned int rps_idx,
          *
          * NumDeltaPocs[RefRpsIdx]: num_delta_pocs[rps_idx - 1]
          */
-        for (i = 0; i < num_delta_pocs[rps_idx - 1]; i++) {
+        for (i = 0; i <= num_delta_pocs[rps_idx - 1]; i++) {
             uint8_t use_delta_flag = 0;
             uint8_t used_by_curr_pic_flag = get_bits1(gb);
             if (!used_by_curr_pic_flag)



More information about the ffmpeg-cvslog mailing list