Commit f1fdd208 authored by Michael Niedermayer's avatar Michael Niedermayer

h264_mp4toannexb_bsf: use i instead of misusing unit_type.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 17431f4a
...@@ -59,6 +59,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, ...@@ -59,6 +59,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
const uint8_t *buf, int buf_size, const uint8_t *buf, int buf_size,
int keyframe) { int keyframe) {
H264BSFContext *ctx = bsfc->priv_data; H264BSFContext *ctx = bsfc->priv_data;
int i;
uint8_t unit_type; uint8_t unit_type;
int32_t nal_size; int32_t nal_size;
uint32_t cumul_size = 0; uint32_t cumul_size = 0;
...@@ -140,8 +141,8 @@ pps: ...@@ -140,8 +141,8 @@ pps:
if (buf + ctx->length_size > buf_end) if (buf + ctx->length_size > buf_end)
goto fail; goto fail;
for(nal_size = 0, unit_type = 0; unit_type<ctx->length_size; unit_type++) for (nal_size = 0, i = 0; i<ctx->length_size; i++)
nal_size = (nal_size << 8) | buf[unit_type]; nal_size = (nal_size << 8) | buf[i];
buf += ctx->length_size; buf += ctx->length_size;
unit_type = *buf & 0x1f; unit_type = *buf & 0x1f;
......
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