Merge commit '8a66fd40260b7aae6226d68c4dbad43b05a8e524'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 11:55:25 +0000 (13:55 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 11:55:58 +0000 (13:55 +0200)
* commit '8a66fd40260b7aae6226d68c4dbad43b05a8e524':
  h264: drop the reinit parameter from init_slice_header()

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

@@@ -426,10 -404,10 +426,10 @@@ static int copy_parameter_set(void **to
  }
  
  #define copy_fields(to, from, start_field, end_field)                   \
 -    memcpy(&to->start_field, &from->start_field,                        \
 -           (char *)&to->end_field - (char *)&to->start_field)
 +    memcpy(&(to)->start_field, &(from)->start_field,                        \
 +           (char *)&(to)->end_field - (char *)&(to)->start_field)
  
- static int h264_slice_header_init(H264Context *h, int reinit);
+ static int h264_slice_header_init(H264Context *h);
  
  int ff_h264_update_thread_context(AVCodecContext *dst,
                                    const AVCodecContext *src)
@@@ -1087,11 -991,11 +1087,11 @@@ static int h264_slice_header_init(H264C
          if (h->x264_build < 44U)
              den *= 2;
          av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num,
 -                  h->sps.num_units_in_tick, den, 1 << 30);
 +                  h->sps.num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30);
      }
  
-     if (reinit)
-         ff_h264_free_tables(h);
+     ff_h264_free_tables(h);
      h->first_field           = 0;
      h->prev_interlaced_frame = 1;
  
@@@ -1413,9 -1232,9 +1413,9 @@@ int ff_h264_decode_slice_header(H264Con
          h->avctx->pix_fmt = ret;
  
          av_log(h->avctx, AV_LOG_INFO, "Reinit context to %dx%d, "
 -               "pix_fmt: %d\n", h->width, h->height, h->avctx->pix_fmt);
 +               "pix_fmt: %s\n", h->width, h->height, av_get_pix_fmt_name(h->avctx->pix_fmt));
  
-         if ((ret = h264_slice_header_init(h, 1)) < 0) {
+         if ((ret = h264_slice_header_init(h)) < 0) {
              av_log(h->avctx, AV_LOG_ERROR,
                     "h264_slice_header_init() failed\n");
              return ret;