Commit cc87493f authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '8a66fd40'

* commit '8a66fd40':
  h264: drop the reinit parameter from init_slice_header()
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 51f7ba9c 8a66fd40
...@@ -429,7 +429,7 @@ static int copy_parameter_set(void **to, void **from, int count, int size) ...@@ -429,7 +429,7 @@ static int copy_parameter_set(void **to, void **from, int count, int size)
memcpy(&(to)->start_field, &(from)->start_field, \ memcpy(&(to)->start_field, &(from)->start_field, \
(char *)&(to)->end_field - (char *)&(to)->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, int ff_h264_update_thread_context(AVCodecContext *dst,
const AVCodecContext *src) const AVCodecContext *src)
...@@ -605,7 +605,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst, ...@@ -605,7 +605,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
h->mb_stride = h1->mb_stride; h->mb_stride = h1->mb_stride;
h->b_stride = h1->b_stride; h->b_stride = h1->b_stride;
if ((err = h264_slice_header_init(h, 1)) < 0) { if ((err = h264_slice_header_init(h)) < 0) {
av_log(h->avctx, AV_LOG_ERROR, "h264_slice_header_init() failed"); av_log(h->avctx, AV_LOG_ERROR, "h264_slice_header_init() failed");
return err; return err;
} }
...@@ -1071,7 +1071,7 @@ static int init_dimensions(H264Context *h) ...@@ -1071,7 +1071,7 @@ static int init_dimensions(H264Context *h)
return 0; return 0;
} }
static int h264_slice_header_init(H264Context *h, int reinit) static int h264_slice_header_init(H264Context *h)
{ {
int nb_slices = (HAVE_THREADS && int nb_slices = (HAVE_THREADS &&
h->avctx->active_thread_type & FF_THREAD_SLICE) ? h->avctx->active_thread_type & FF_THREAD_SLICE) ?
...@@ -1090,8 +1090,8 @@ static int h264_slice_header_init(H264Context *h, int reinit) ...@@ -1090,8 +1090,8 @@ static int h264_slice_header_init(H264Context *h, int reinit)
h->sps.num_units_in_tick * h->avctx->ticks_per_frame, 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->first_field = 0;
h->prev_interlaced_frame = 1; h->prev_interlaced_frame = 1;
...@@ -1415,7 +1415,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) ...@@ -1415,7 +1415,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
av_log(h->avctx, AV_LOG_INFO, "Reinit context to %dx%d, " av_log(h->avctx, AV_LOG_INFO, "Reinit context to %dx%d, "
"pix_fmt: %s\n", h->width, h->height, av_get_pix_fmt_name(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, av_log(h->avctx, AV_LOG_ERROR,
"h264_slice_header_init() failed\n"); "h264_slice_header_init() failed\n");
return ret; return ret;
...@@ -1432,7 +1432,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) ...@@ -1432,7 +1432,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
return ret; return ret;
h->avctx->pix_fmt = ret; h->avctx->pix_fmt = ret;
if ((ret = h264_slice_header_init(h, 0)) < 0) { if ((ret = h264_slice_header_init(h)) < 0) {
av_log(h->avctx, AV_LOG_ERROR, av_log(h->avctx, AV_LOG_ERROR,
"h264_slice_header_init() failed\n"); "h264_slice_header_init() failed\n");
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment