Mercurial > libavcodec.hg
changeset 9501:880d9562d218 libavcodec
Avoid code duplication in xan_unpack for the final memcpy.
author | reimar |
---|---|
date | Sat, 18 Apr 2009 17:26:00 +0000 |
parents | 9157421b6239 |
children | 56f844aec27b |
files | xan.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/xan.c Fri Apr 17 20:05:27 2009 +0000 +++ b/xan.c Sat Apr 18 17:26:00 2009 +0000 @@ -157,17 +157,18 @@ av_memcpy_backptr(dest, back, size2); dest += size2; } else { + int finish; size = ((opcode & 0x1f) << 2) + 4; - if (size > 0x70) - break; + finish = size > 0x70; + if (finish) + size = opcode & 3; memcpy(dest, src, size); dest += size; src += size; + if (finish) + return; } } - - size = opcode & 3; - memcpy(dest, src, size); dest += size; src += size; } static inline void xan_wc3_output_pixel_run(XanContext *s,