st/omx/dec/h264: fix prevFrameNumOffset handling
authorChristian König <christian.koenig@amd.com>
Wed, 19 Feb 2014 17:49:17 +0000 (18:49 +0100)
committerChristian König <christian.koenig@amd.com>
Thu, 20 Feb 2014 12:34:06 +0000 (13:34 +0100)
Signed-off-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/omx/vid_dec_h264.c

index 5f4a261705c15a18e86372ec7f90beacad029c88..7f1c2facc391a6ede8fcd2de83b3c69ce2031a97 100644 (file)
@@ -765,6 +765,8 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp,
       else
          FrameNumOffset = priv->codec_data.h264.prevFrameNumOffset;
 
+      priv->codec_data.h264.prevFrameNumOffset = FrameNumOffset;
+
       if (sps->num_ref_frames_in_pic_order_cnt_cycle != 0)
          absFrameNum = FrameNumOffset + frame_num;
       else
@@ -814,6 +816,8 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp,
       else
          FrameNumOffset = priv->codec_data.h264.prevFrameNumOffset;
 
+      priv->codec_data.h264.prevFrameNumOffset = FrameNumOffset;
+
       if (IdrPicFlag)
          tempPicOrderCnt = 0;
       else if (nal_ref_idc == 0)