[FFmpeg-cvslog] lavc/mediacodecdec_h264: fix SODB escaping
Matthieu Bouron
git at videolan.org
Wed Sep 28 17:25:10 EEST 2016
ffmpeg | branch: release/3.1 | Matthieu Bouron <matthieu.bouron at stupeflix.com> | Tue Sep 6 16:30:07 2016 +0200| [d0590d93493a3b854e4e2755f0637099ef551b98] | committer: Matthieu Bouron
lavc/mediacodecdec_h264: fix SODB escaping
Fixes escaping of consecutive 0x00, 0x00, 0x0{0-3} sequences.
(cherry picked from commit f574012d5fe922684a5befa16828f22fe9a83ce8)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0590d93493a3b854e4e2755f0637099ef551b98
---
libavcodec/mediacodecdec_h264.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mediacodecdec_h264.c b/libavcodec/mediacodecdec_h264.c
index 11fb677..f663267 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:
More information about the ffmpeg-cvslog
mailing list