History

avcodec/wcmv: Avoid copying frames if they are unchanged

Improves speed of the testcase by about a factor of 10 Fixes: Timeout Fixes: 13132/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5664190616829952

Michael Niedermayer committed 7 years ago

Commit 976dae81 parent 286a33e1 file · +3 −1Browse files

Unified · Split

libavcodec/wcmv.c+3−1
@@ -56,11 +56,13 @@ static int decode_frame(AVCodecContext *avctx, · 55 unmodified lines
56 }56 }
57 57
58 bytestream2_init(&gb, avpkt->data, avpkt->size);58 bytestream2_init(&gb, avpkt->data, avpkt->size);
59 blocks = bytestream2_get_le16(&gb);
60 if (!blocks)
61 return avpkt->size;
59 62
60 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)63 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
61 return ret;64 return ret;
62 65
63 blocks = bytestream2_get_le16(&gb);
64 if (blocks > 5) {66 if (blocks > 5) {
65 GetByteContext bgb;67 GetByteContext bgb;
66 int x = 0, size;68 int x = 0, size;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t