[FFmpeg-cvslog] Merge commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a'

Clément Bœsch git at videolan.org
Wed Apr 26 18:28:59 EEST 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Wed Apr 26 17:25:54 2017 +0200| [84a368f6fec8a74d78a266785f3eeff3648827ba] | committer: Clément Bœsch

Merge commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a'

* commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a':
  hevcdec: do not set decoder-global SPS prematurely

Merged-by: Clément Bœsch <u at pkh.me>

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

 libavcodec/hevcdec.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 0c620d40fa..b698c0bbc7 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -459,23 +459,23 @@ static int hls_slice_header(HEVCContext *s)
         sh->no_output_of_prior_pics_flag = 1;
 
     if (s->ps.sps != (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data) {
-        const HEVCSPS* last_sps = s->ps.sps;
+        const HEVCSPS *sps = (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data;
+        const HEVCSPS *last_sps = s->ps.sps;
         enum AVPixelFormat pix_fmt;
 
-        s->ps.sps = (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data;
         if (last_sps && IS_IRAP(s) && s->nal_unit_type != HEVC_NAL_CRA_NUT) {
-            if (s->ps.sps->width !=  last_sps->width || s->ps.sps->height != last_sps->height ||
-                s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].max_dec_pic_buffering !=
+            if (sps->width != last_sps->width || sps->height != last_sps->height ||
+                sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering !=
                 last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering)
                 sh->no_output_of_prior_pics_flag = 0;
         }
         ff_hevc_clear_refs(s);
 
-        pix_fmt = get_format(s, s->ps.sps);
+        pix_fmt = get_format(s, sps);
         if (pix_fmt < 0)
             return pix_fmt;
 
-        ret = set_sps(s, s->ps.sps, pix_fmt);
+        ret = set_sps(s, sps, pix_fmt);
         if (ret < 0)
             return ret;
 


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

diff --cc libavcodec/hevcdec.c
index 0c620d40fa,147243e3fe..b698c0bbc7
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@@ -455,23 -477,14 +455,23 @@@ static int hls_slice_header(HEVCContex
          return AVERROR_INVALIDDATA;
      }
      s->ps.pps = (HEVCPPS*)s->ps.pps_list[sh->pps_id]->data;
 +    if (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos == 1)
 +        sh->no_output_of_prior_pics_flag = 1;
  
      if (s->ps.sps != (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data) {
-         const HEVCSPS* last_sps = s->ps.sps;
+         const HEVCSPS *sps = (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data;
++        const HEVCSPS *last_sps = s->ps.sps;
          enum AVPixelFormat pix_fmt;
  
-         s->ps.sps = (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data;
 +        if (last_sps && IS_IRAP(s) && s->nal_unit_type != HEVC_NAL_CRA_NUT) {
-             if (s->ps.sps->width !=  last_sps->width || s->ps.sps->height != last_sps->height ||
-                 s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].max_dec_pic_buffering !=
++            if (sps->width != last_sps->width || sps->height != last_sps->height ||
++                sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering !=
 +                last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering)
 +                sh->no_output_of_prior_pics_flag = 0;
 +        }
          ff_hevc_clear_refs(s);
  
-         pix_fmt = get_format(s, s->ps.sps);
+         pix_fmt = get_format(s, sps);
          if (pix_fmt < 0)
              return pix_fmt;
  



More information about the ffmpeg-cvslog mailing list