1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00

avcodec/libx264: move sei_data_size out of the for loop

Otherwise its value will be reset on each iteration.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2021-10-20 00:21:44 -03:00
parent a59f8ea2a9
commit 1e22ad2ada

View File

@ -319,6 +319,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
if (frame) {
x264_sei_t *sei = &x4->pic.extra_sei;
unsigned int sei_data_size = 0;
for (i = 0; i < x4->pic.img.i_plane; i++) {
x4->pic.img.plane[i] = frame->data[i];
@ -445,7 +446,6 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
for (int j = 0; j < frame->nb_side_data; j++) {
AVFrameSideData *side_data = frame->side_data[j];
unsigned int sei_data_size = 0;
void *tmp;
x264_sei_payload_t *sei_payload;
if (side_data->type != AV_FRAME_DATA_SEI_UNREGISTERED)