Merge commit '3a0576702825423abecb32627c530dbc4c0f73bc'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 14 Feb 2014 12:58:02 +0000 (13:58 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 14 Feb 2014 12:58:02 +0000 (13:58 +0100)
* commit '3a0576702825423abecb32627c530dbc4c0f73bc':
  h264: store current_sps_id inside the current sps

Conflicts:
libavcodec/h264.c
libavcodec/h264_ps.c

The current_sps_id is not removed as it used in security related code.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_ps.c

@@@ -3523,18 -3414,12 +3523,19 @@@ static int decode_slice_header(H264Cont
          return AVERROR_INVALIDDATA;
      }
  
-     if (h->pps.sps_id != h->current_sps_id ||
+     if (h->pps.sps_id != h->sps.sps_id ||
++        h->pps.sps_id != h->current_sps_id ||
          h0->sps_buffers[h->pps.sps_id]->new) {
 -        h0->sps_buffers[h->pps.sps_id]->new = 0;
  
-         h->sps            = *h0->sps_buffers[h->pps.sps_id];
+         h->sps = *h0->sps_buffers[h->pps.sps_id];
  
 +        if (h->mb_width  != h->sps.mb_width ||
 +            h->mb_height != h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) ||
 +            h->avctx->bits_per_raw_sample != h->sps.bit_depth_luma ||
 +            h->cur_chroma_format_idc != h->sps.chroma_format_idc
 +        )
 +            needs_reinit = 1;
 +
          if (h->bit_depth_luma    != h->sps.bit_depth_luma ||
              h->chroma_format_idc != h->sps.chroma_format_idc) {
              h->bit_depth_luma    = h->sps.bit_depth_luma;
Simple merge
Simple merge