[FFmpeg-cvslog] Merge commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960'

Clément Bœsch git at videolan.org
Wed Jun 29 18:03:29 CEST 2016


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Wed Jun 29 17:59:57 2016 +0200| [4890b0851c5e6b607c9b8695166f13dc770b19bc] | committer: Clément Bœsch

Merge commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960'

* commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960':
  h264: move calculating the POC out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement at stupeflix.com>

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

 libavcodec/h264_slice.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index e07f866..0e09ee2 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1575,10 +1575,6 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
         }
     }
 
-    if (!h->setup_finished)
-        ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc,
-                         sps, &h->poc, h->picture_structure, h->nal_ref_idc);
-
     if (pps->redundant_pic_cnt_present)
         sl->redundant_pic_count = get_ue_golomb(&sl->gb);
 
@@ -1696,6 +1692,10 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
     if (ret) // can not be ret<0 because of SLICE_SKIPED, SLICE_SINGLETHREAD, ...
         return ret;
 
+    if (!h->setup_finished)
+        ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc,
+                         h->ps.sps, &h->poc, h->picture_structure, h->nal_ref_idc);
+
     ret = ff_h264_build_ref_list(h, sl);
     if (ret < 0)
         return ret;


======================================================================

diff --cc libavcodec/h264_slice.c
index e07f866,3252b38..0e09ee2
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@@ -1693,9 -1439,13 +1689,13 @@@ int ff_h264_decode_slice_header(H264Con
      int i, j, ret = 0;
  
      ret = h264_slice_header_parse(h, sl);
 -    if (ret < 0)
 +    if (ret) // can not be ret<0 because of SLICE_SKIPED, SLICE_SINGLETHREAD, ...
          return ret;
  
+     if (!h->setup_finished)
+         ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc,
+                          h->ps.sps, &h->poc, h->picture_structure, h->nal_ref_idc);
+ 
      ret = ff_h264_build_ref_list(h, sl);
      if (ret < 0)
          return ret;



More information about the ffmpeg-cvslog mailing list