diff options
author | Matthieu Bouron <matthieu.bouron@stupeflix.com> | 2016-09-06 16:30:07 +0200 |
---|---|---|
committer | Matthieu Bouron <matthieu.bouron@stupeflix.com> | 2016-09-28 16:22:24 +0200 |
commit | d0590d93493a3b854e4e2755f0637099ef551b98 (patch) | |
tree | 125d8fe918dc2678dde84a673b464faa1c7b4955 | |
parent | e60a00e0cc48930867cc6a9224d406a026f7c081 (diff) | |
download | ffmpeg-d0590d93493a3b854e4e2755f0637099ef551b98.tar.gz |
lavc/mediacodecdec_h264: fix SODB escaping
Fixes escaping of consecutive 0x00, 0x00, 0x0{0-3} sequences.
(cherry picked from commit f574012d5fe922684a5befa16828f22fe9a83ce8)
-rw-r--r-- | libavcodec/mediacodecdec_h264.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mediacodecdec_h264.c b/libavcodec/mediacodecdec_h264.c index 11fb677d5c..f663267996 100644 --- a/libavcodec/mediacodecdec_h264.c +++ b/libavcodec/mediacodecdec_h264.c @@ -103,9 +103,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: |