diff options
author | James Almer <jamrial@gmail.com> | 2021-10-20 00:21:44 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-10-20 00:21:44 -0300 |
commit | 1e22ad2adab194ff65fe20fdda1d451ef30cbaab (patch) | |
tree | 140c494f23ee30ab7fdc6d8af892ec7b01f24a9a | |
parent | a59f8ea2a9104b47b231a73a4c6bd0678fd9529c (diff) |
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>
-rw-r--r-- | libavcodec/libx264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 13cdd6a022..21f434d06d 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -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) |