avcodec/zmbv: obtain frame later
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 21 Feb 2019 16:25:14 +0000 (17:25 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 24 Mar 2019 09:38:51 +0000 (10:38 +0100)
commitedf0297c6147453571c96042d0b09a45720dee3f
tree0324a46cb359585b32a78310175df76dada1f3a1
parent3891dbf4cf6564767ffc564374db741ae5efa5f8
avcodec/zmbv: obtain frame later

The frame is not needed that early so obtaining it later avoids
the costly operation in case other checks fail.

Fixes: Timeout (14sec -> 4sec)
Fixes: 13140/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5738330308739072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 177b40890c6de8c6896e0a1d4a631ea1ca89c044)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/zmbv.c