[FFmpeg-cvslog] Merge commit '00fd914d4912322212e924c15f325cebf2fde8d3'

James Almer git at videolan.org
Sat Nov 11 02:08:13 EET 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Nov 10 20:31:55 2017 -0300| [7762942045a05170de8bbe9d707c2344b445907f] | committer: James Almer

Merge commit '00fd914d4912322212e924c15f325cebf2fde8d3'

* commit '00fd914d4912322212e924c15f325cebf2fde8d3':
  hevcdec: set the active SPS before calling get_format()

Merged-by: James Almer <jamrial at gmail.com>

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

 libavcodec/hevcdec.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 675025b211..403a8cf454 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -503,13 +503,14 @@ static int hls_slice_header(HEVCContext *s)
         }
         ff_hevc_clear_refs(s);
 
+        ret = set_sps(s, sps, sps->pix_fmt);
+        if (ret < 0)
+            return ret;
+
         pix_fmt = get_format(s, sps);
         if (pix_fmt < 0)
             return pix_fmt;
-
-        ret = set_sps(s, sps, pix_fmt);
-        if (ret < 0)
-            return ret;
+        s->avctx->pix_fmt = pix_fmt;
 
         s->seq_decode = (s->seq_decode + 1) & 0xff;
         s->max_ra     = INT_MAX;


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

diff --cc libavcodec/hevcdec.c
index 675025b211,664e4ac14b..403a8cf454
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@@ -492,17 -486,14 +492,21 @@@ static int hls_slice_header(HEVCContex
  
      if (s->ps.sps != (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data) {
          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;
  
 +        if (last_sps && IS_IRAP(s) && s->nal_unit_type != HEVC_NAL_CRA_NUT) {
 +            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);
  
+         ret = set_sps(s, sps, sps->pix_fmt);
+         if (ret < 0)
+             return ret;
+ 
          pix_fmt = get_format(s, sps);
          if (pix_fmt < 0)
              return pix_fmt;



More information about the ffmpeg-cvslog mailing list