aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dfa.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-10-23 18:17:46 +0100
committerMans Rullgard <mans@mansr.com>2012-10-23 18:57:24 +0100
commita153e45b953dee5b065939300d3a591772f43b19 (patch)
tree6ed48acdac6f3ec3d8dfad4661142fd4793e9006 /libavcodec/dfa.c
parente831b3b852a23cd24f2941e68bd65299ce306880 (diff)
downloadffmpeg-a153e45b953dee5b065939300d3a591772f43b19.tar.gz
dfa: use av_memcpy_backptr() where previously impossible
Since the requirement for output padding has been lifted, we can use av_memcpy_backptr() here as well. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/dfa.c')
-rw-r--r--libavcodec/dfa.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 46051e041d..ae184d7b5f 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -122,9 +122,7 @@ static int decode_dsw1(GetByteContext *gb, uint8_t *frame, int width, int height
count = ((v >> 13) + 2) << 1;
if (frame - frame_start < offset || frame_end - frame < count)
return AVERROR_INVALIDDATA;
- // can't use av_memcpy_backptr() since it can overwrite following pixels
- for (v = 0; v < count; v++)
- frame[v] = frame[v - offset];
+ av_memcpy_backptr(frame, offset, count);
frame += count;
} else if (bitbuf & (mask << 1)) {
frame += bytestream2_get_le16(gb);