diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-21 22:33:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-21 22:33:28 +0100 |
commit | f1fdd208cc0a1fce7aaaf6b0fe72b013525f49e0 (patch) | |
tree | c6de315e335bc6500aa6a5481fcd4a889cbb7c46 | |
parent | 17431f4a4e5c66a669f51dd7eb3d880d70e6dc4c (diff) | |
download | ffmpeg-f1fdd208cc0a1fce7aaaf6b0fe72b013525f49e0.tar.gz |
h264_mp4toannexb_bsf: use i instead of misusing unit_type.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264_mp4toannexb_bsf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index 62f9cb0dfd..3f69d7c676 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -59,6 +59,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, const uint8_t *buf, int buf_size, int keyframe) { H264BSFContext *ctx = bsfc->priv_data; + int i; uint8_t unit_type; int32_t nal_size; uint32_t cumul_size = 0; @@ -140,8 +141,8 @@ pps: if (buf + ctx->length_size > buf_end) goto fail; - for(nal_size = 0, unit_type = 0; unit_type<ctx->length_size; unit_type++) - nal_size = (nal_size << 8) | buf[unit_type]; + for (nal_size = 0, i = 0; i<ctx->length_size; i++) + nal_size = (nal_size << 8) | buf[i]; buf += ctx->length_size; unit_type = *buf & 0x1f; |