Commit 8c881320 authored by Fiona Glaser's avatar Fiona Glaser

Fix reconfiguration of parameters that modify the SPS

For now, this is only aspect ratio.
parent 49638791
......@@ -418,6 +418,9 @@ struct x264_t
uint8_t *nal_buffer;
int nal_buffer_size;
x264_sps_t *sps;
x264_pps_t *pps;
/**** thread synchronization starts here ****/
/* frame number/poc */
......@@ -445,9 +448,7 @@ struct x264_t
/* We use only one SPS and one PPS */
x264_sps_t sps_array[1];
x264_sps_t *sps;
x264_pps_t pps_array[1];
x264_pps_t *pps;
int i_idr_pic_id;
/* quantization matrix for decoding, [cqm][qp%6][coef] */
......
......@@ -909,6 +909,7 @@ static void x264_set_aspect_ratio( x264_t *h, x264_param_t *param, int initial )
h->param.vui.i_sar_width = i_w;
h->param.vui.i_sar_height = i_h;
}
x264_sps_init( h->sps, h->param.i_sps_id, &h->param );
}
}
}
......@@ -1124,6 +1125,9 @@ x264_t *x264_encoder_open( x264_param_t *param )
else
h->thread[i]->fdec = h->thread[0]->fdec;
h->thread[i]->sps = &h->thread[i]->sps_array[0];
h->thread[i]->pps = &h->thread[i]->pps_array[0];
CHECKED_MALLOC( h->thread[i]->out.p_bitstream, h->out.i_bitstream );
/* Start each thread with room for init_nal_count NAL units; it'll realloc later if needed. */
CHECKED_MALLOC( h->thread[i]->out.nal, init_nal_count*sizeof(x264_nal_t) );
......
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