Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-09-06 17:30:07 +0300
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-09-07 16:35:09 +0300
commitf574012d5fe922684a5befa16828f22fe9a83ce8 (patch)
treeb3a0eefd60fc65f0e0c8f72f9f082bd5669f590b /libavcodec
parent207d78176f868555ed7b5db4eb6ec9af9d3f700d (diff)
lavc/mediacodecdec_h264: fix SODB escaping
Fixes escaping of consecutive 0x00, 0x00, 0x0{0-3} sequences.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mediacodecdec_h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mediacodecdec_h264.c b/libavcodec/mediacodecdec_h264.c
index 18f186b8fa..96e2a8af04 100644
--- a/libavcodec/mediacodecdec_h264.c
+++ b/libavcodec/mediacodecdec_h264.c
@@ -104,9 +104,9 @@ static int h264_ps_to_nalu(const uint8_t *src, int src_size, uint8_t **out, int
}
*out = p = new;
- i = i + 3;
- memmove(p + i, p + i - 1, *out_size - i);
- p[i - 1] = 0x03;
+ i = i + 2;
+ memmove(p + i + 1, p + i, *out_size - (i + 1));
+ p[i] = 0x03;
}
}
done: