[FFmpeg-devel] [PATCH] lavc/h264_slice: move au_pps_id and current_sps_id assignment earlier

Clément Bœsch u at pkh.me
Wed Jun 29 12:52:18 CEST 2016


From: Clément Bœsch <clement at stupeflix.com>

This will simplify the next merge commit from Libav.
---
 libavcodec/h264_slice.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 474400b..0b5079c 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1202,6 +1202,9 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
     pps = h->ps.pps;
     sps = h->ps.sps;
 
+    h->au_pps_id = pps_id;
+    h->current_sps_id = h->ps.pps->sps_id;
+
     must_reinit = (h->context_initialized &&
                     (   16*sps->mb_width != h->avctx->coded_width
                      || 16*sps->mb_height * (2 - sps->frame_mbs_only_flag) != h->avctx->coded_height
@@ -1782,9 +1785,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
                              (sl->ref_list[j][i].reference & 3);
     }
 
-    h->au_pps_id = pps_id;
-    h->current_sps_id = h->ps.pps->sps_id;
-
     if (h->avctx->debug & FF_DEBUG_PICT_INFO) {
         av_log(h->avctx, AV_LOG_DEBUG,
                "slice:%d %s mb:%d %c%s%s pps:%u frame:%d poc:%d/%d ref:%d/%d qp:%d loop:%d:%d:%d weight:%d%s %s\n",
-- 
2.9.0



More information about the ffmpeg-devel mailing list