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)
h->mb_stride = h1->mb_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");
return err;
}
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 &&
h->avctx->active_thread_type & FF_THREAD_SLICE) ?
h->sps.num_units_in_tick, den, 1 << 30);
}
- if (reinit)
- ff_h264_free_tables(h);
+ ff_h264_free_tables(h);
+
h->first_field = 0;
h->prev_interlaced_frame = 1;
av_log(h->avctx, AV_LOG_INFO, "Reinit context to %dx%d, "
"pix_fmt: %d\n", h->width, h->height, 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;
return 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,
"h264_slice_header_init() failed\n");
return ret;