# HG changeset patch # User alex # Date 1164327392 0 # Node ID e560d163e7a87c914f574f30eeb59cf4bbb693df # Parent 5e05fadc93d12c844015fe8df8d12880449a1d5a Implement DELTA_FLI opcodes correctly. Patch by Steven Johnson diff -r 5e05fadc93d1 -r e560d163e7a8 flicvideo.c --- a/flicvideo.c Thu Nov 23 23:50:08 2006 +0000 +++ b/flicvideo.c Fri Nov 24 00:16:32 2006 +0000 @@ -246,9 +246,15 @@ while (compressed_lines > 0) { line_packets = LE_16(&buf[stream_ptr]); stream_ptr += 2; - if (line_packets < 0) { + if ((line_packets & 0xC000) == 0xC000) { + // line skip opcode line_packets = -line_packets; y_ptr += line_packets * s->frame.linesize[0]; + } else if ((line_packets & 0xC000) == 0x4000) { + av_log(avctx, AV_LOG_ERROR, "Undefined opcode (%x) in DELTA_FLI\n", line_packets); + } else if ((line_packets & 0xC000) == 0x8000) { + // "last byte" opcode + pixels[y_ptr + s->frame.linesize[0] - 1] = line_packets & 0xff; } else { compressed_lines--; pixel_ptr = y_ptr;