Commit d2015e6b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/tscc: Do not duplicate images

This improves speed

Fixes: Timeout
Fixes: 9010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TSCC_fuzzer-6042614817095680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 679bfa45
...@@ -94,6 +94,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -94,6 +94,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
c->zstream.avail_out = c->decomp_size; c->zstream.avail_out = c->decomp_size;
ret = inflate(&c->zstream, Z_FINISH); ret = inflate(&c->zstream, Z_FINISH);
// Z_DATA_ERROR means empty picture // Z_DATA_ERROR means empty picture
if (ret == Z_DATA_ERROR && !palette_has_changed) {
return buf_size;
}
if ((ret != Z_OK) && (ret != Z_STREAM_END) && (ret != Z_DATA_ERROR)) { if ((ret != Z_OK) && (ret != Z_STREAM_END) && (ret != Z_DATA_ERROR)) {
av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", ret); av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", ret);
return AVERROR_UNKNOWN; return AVERROR_UNKNOWN;
......
This diff is collapsed.
...@@ -11,151 +11,30 @@ ...@@ -11,151 +11,30 @@
0, 5, 5, 1, 2359296, 0xbb0e0026 0, 5, 5, 1, 2359296, 0xbb0e0026
0, 6, 6, 1, 2359296, 0x66a905ab 0, 6, 6, 1, 2359296, 0x66a905ab
0, 7, 7, 1, 2359296, 0xe990f855 0, 7, 7, 1, 2359296, 0xe990f855
0, 8, 8, 1, 2359296, 0xe990f855
0, 9, 9, 1, 2359296, 0x3ec2c64e 0, 9, 9, 1, 2359296, 0x3ec2c64e
0, 13, 13, 1, 2359296, 0xda3ba3cf 0, 13, 13, 1, 2359296, 0xda3ba3cf
0, 14, 14, 1, 2359296, 0x60a070fd 0, 14, 14, 1, 2359296, 0x60a070fd
0, 15, 15, 1, 2359296, 0x42e5fedc 0, 15, 15, 1, 2359296, 0x42e5fedc
0, 16, 16, 1, 2359296, 0x42e5fedc
0, 17, 17, 1, 2359296, 0x699cf990 0, 17, 17, 1, 2359296, 0x699cf990
0, 18, 18, 1, 2359296, 0x699cf990
0, 19, 19, 1, 2359296, 0x699cf990
0, 20, 20, 1, 2359296, 0x699cf990
0, 21, 21, 1, 2359296, 0x699cf990
0, 22, 22, 1, 2359296, 0x699cf990
0, 23, 23, 1, 2359296, 0x699cf990
0, 24, 24, 1, 2359296, 0x1524160c 0, 24, 24, 1, 2359296, 0x1524160c
0, 25, 25, 1, 2359296, 0x1524160c
0, 26, 26, 1, 2359296, 0x1524160c
0, 27, 27, 1, 2359296, 0x1524160c
0, 28, 28, 1, 2359296, 0x1524160c
0, 29, 29, 1, 2359296, 0x1524160c
0, 30, 30, 1, 2359296, 0x1524160c
0, 31, 31, 1, 2359296, 0x33df0c8c 0, 31, 31, 1, 2359296, 0x33df0c8c
0, 32, 32, 1, 2359296, 0x33df0c8c
0, 33, 33, 1, 2359296, 0x33df0c8c
0, 34, 34, 1, 2359296, 0x33df0c8c
0, 35, 35, 1, 2359296, 0x33df0c8c
0, 36, 36, 1, 2359296, 0x33df0c8c
0, 37, 37, 1, 2359296, 0x33df0c8c
0, 38, 38, 1, 2359296, 0xfe3d29f8 0, 38, 38, 1, 2359296, 0xfe3d29f8
0, 39, 39, 1, 2359296, 0xfe3d29f8
0, 40, 40, 1, 2359296, 0xfe3d29f8
0, 41, 41, 1, 2359296, 0xfe3d29f8
0, 42, 42, 1, 2359296, 0xfe3d29f8
0, 43, 43, 1, 2359296, 0xfe3d29f8
0, 44, 44, 1, 2359296, 0xfe3d29f8
0, 45, 45, 1, 2359296, 0x1b9d197f 0, 45, 45, 1, 2359296, 0x1b9d197f
0, 46, 46, 1, 2359296, 0x1b9d197f
0, 47, 47, 1, 2359296, 0x1b9d197f
0, 48, 48, 1, 2359296, 0x1b9d197f
0, 49, 49, 1, 2359296, 0x1b9d197f
0, 50, 50, 1, 2359296, 0x1b9d197f
0, 51, 51, 1, 2359296, 0x1b9d197f
0, 52, 52, 1, 2359296, 0x48c126fb 0, 52, 52, 1, 2359296, 0x48c126fb
0, 53, 53, 1, 2359296, 0x48c126fb
0, 54, 54, 1, 2359296, 0x48c126fb
0, 55, 55, 1, 2359296, 0x48c126fb
0, 56, 56, 1, 2359296, 0x48c126fb
0, 57, 57, 1, 2359296, 0x48c126fb
0, 58, 58, 1, 2359296, 0x48c126fb
0, 59, 59, 1, 2359296, 0xcaa31c7c 0, 59, 59, 1, 2359296, 0xcaa31c7c
0, 60, 60, 1, 2359296, 0xcaa31c7c
0, 61, 61, 1, 2359296, 0xcaa31c7c
0, 62, 62, 1, 2359296, 0xcaa31c7c
0, 63, 63, 1, 2359296, 0xcaa31c7c
0, 64, 64, 1, 2359296, 0xcaa31c7c
0, 65, 65, 1, 2359296, 0xcaa31c7c
0, 66, 66, 1, 2359296, 0xc6a333ee 0, 66, 66, 1, 2359296, 0xc6a333ee
0, 67, 67, 1, 2359296, 0xc6a333ee
0, 68, 68, 1, 2359296, 0xc6a333ee
0, 69, 69, 1, 2359296, 0xc6a333ee
0, 70, 70, 1, 2359296, 0xc6a333ee
0, 71, 71, 1, 2359296, 0xc6a333ee
0, 72, 72, 1, 2359296, 0xc6a333ee
0, 73, 73, 1, 2359296, 0xb96d1583 0, 73, 73, 1, 2359296, 0xb96d1583
0, 74, 74, 1, 2359296, 0xb96d1583
0, 75, 75, 1, 2359296, 0xb96d1583
0, 76, 76, 1, 2359296, 0xb96d1583
0, 77, 77, 1, 2359296, 0xb96d1583
0, 78, 78, 1, 2359296, 0xb96d1583
0, 79, 79, 1, 2359296, 0xb96d1583
0, 80, 80, 1, 2359296, 0x878135ec 0, 80, 80, 1, 2359296, 0x878135ec
0, 82, 82, 1, 2359296, 0x878135ec
0, 83, 83, 1, 2359296, 0x878135ec
0, 84, 84, 1, 2359296, 0x878135ec
0, 85, 85, 1, 2359296, 0x878135ec
0, 86, 86, 1, 2359296, 0x878135ec
0, 87, 87, 1, 2359296, 0x878135ec
0, 88, 88, 1, 2359296, 0x76922870 0, 88, 88, 1, 2359296, 0x76922870
0, 89, 89, 1, 2359296, 0x76922870
0, 90, 90, 1, 2359296, 0x76922870
0, 91, 91, 1, 2359296, 0x76922870
0, 92, 92, 1, 2359296, 0x76922870
0, 93, 93, 1, 2359296, 0x76922870
0, 94, 94, 1, 2359296, 0x76922870
0, 95, 95, 1, 2359296, 0xb0e031f0 0, 95, 95, 1, 2359296, 0xb0e031f0
0, 96, 96, 1, 2359296, 0xb0e031f0
0, 97, 97, 1, 2359296, 0xb0e031f0
0, 98, 98, 1, 2359296, 0xb0e031f0
0, 99, 99, 1, 2359296, 0xb0e031f0
0, 100, 100, 1, 2359296, 0xb0e031f0
0, 101, 101, 1, 2359296, 0xb0e031f0
0, 102, 102, 1, 2359296, 0xb2ef2a6e 0, 102, 102, 1, 2359296, 0xb2ef2a6e
0, 103, 103, 1, 2359296, 0xb2ef2a6e
0, 104, 104, 1, 2359296, 0xb2ef2a6e
0, 105, 105, 1, 2359296, 0x083c2474 0, 105, 105, 1, 2359296, 0x083c2474
0, 106, 106, 1, 2359296, 0x083c2474
0, 107, 107, 1, 2359296, 0x083c2474
0, 108, 108, 1, 2359296, 0x083c2474
0, 109, 109, 1, 2359296, 0xbdfe2ef3 0, 109, 109, 1, 2359296, 0xbdfe2ef3
0, 110, 110, 1, 2359296, 0xbdfe2ef3
0, 111, 111, 1, 2359296, 0xbdfe2ef3
0, 112, 112, 1, 2359296, 0xbdfe2ef3
0, 113, 113, 1, 2359296, 0xbdfe2ef3
0, 114, 114, 1, 2359296, 0xbdfe2ef3
0, 115, 115, 1, 2359296, 0xbdfe2ef3
0, 116, 116, 1, 2359296, 0x934b1484 0, 116, 116, 1, 2359296, 0x934b1484
0, 117, 117, 1, 2359296, 0x934b1484
0, 118, 118, 1, 2359296, 0x934b1484
0, 119, 119, 1, 2359296, 0x934b1484
0, 120, 120, 1, 2359296, 0x3e0d1a7e 0, 120, 120, 1, 2359296, 0x3e0d1a7e
0, 121, 121, 1, 2359296, 0x3e0d1a7e
0, 122, 122, 1, 2359296, 0x3e0d1a7e
0, 123, 123, 1, 2359296, 0x3ce539e8 0, 123, 123, 1, 2359296, 0x3ce539e8
0, 124, 124, 1, 2359296, 0x3ce539e8
0, 125, 125, 1, 2359296, 0x3ce539e8
0, 126, 126, 1, 2359296, 0x3ce539e8
0, 127, 127, 1, 2359296, 0x3ce539e8
0, 128, 128, 1, 2359296, 0x3ce539e8
0, 129, 129, 1, 2359296, 0x3ce539e8
0, 130, 130, 1, 2359296, 0xd46c2f69 0, 130, 130, 1, 2359296, 0xd46c2f69
0, 131, 131, 1, 2359296, 0xd46c2f69
0, 132, 132, 1, 2359296, 0xd46c2f69
0, 133, 133, 1, 2359296, 0xd46c2f69
0, 134, 134, 1, 2359296, 0xd46c2f69
0, 135, 135, 1, 2359296, 0xd46c2f69
0, 136, 136, 1, 2359296, 0xd46c2f69
0, 137, 137, 1, 2359296, 0x8d2933ee 0, 137, 137, 1, 2359296, 0x8d2933ee
0, 138, 138, 1, 2359296, 0x8d2933ee
0, 139, 139, 1, 2359296, 0x8d2933ee
0, 140, 140, 1, 2359296, 0x8d2933ee
0, 141, 141, 1, 2359296, 0x8d2933ee
0, 142, 142, 1, 2359296, 0x8d2933ee
0, 143, 143, 1, 2359296, 0x8d2933ee
0, 144, 144, 1, 2359296, 0xb6092b6d 0, 144, 144, 1, 2359296, 0xb6092b6d
0, 145, 145, 1, 2359296, 0xb6092b6d
0, 146, 146, 1, 2359296, 0xb6092b6d
0, 147, 147, 1, 2359296, 0xb6092b6d
0, 148, 148, 1, 2359296, 0xb6092b6d
0, 149, 149, 1, 2359296, 0xb6092b6d
0, 150, 150, 1, 2359296, 0xb6092b6d
0, 151, 151, 1, 2359296, 0xe4ef27fa 0, 151, 151, 1, 2359296, 0xe4ef27fa
0, 152, 152, 1, 2359296, 0xe4ef27fa
0, 153, 153, 1, 2359296, 0xe4ef27fa
0, 154, 154, 1, 2359296, 0xe4ef27fa
0, 155, 155, 1, 2359296, 0xe4ef27fa
0, 156, 156, 1, 2359296, 0xe4ef27fa
0, 157, 157, 1, 2359296, 0xe4ef27fa
0, 158, 158, 1, 2359296, 0x5e5b2672 0, 158, 158, 1, 2359296, 0x5e5b2672
0, 159, 159, 1, 2359296, 0x5e5b2672
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment