[FFmpeg-devel,2/2] avcodec/motionpixels: Mark 2 functions as always_inline

Submitted by Michael Niedermayer on Sept. 17, 2019, 11:43 p.m.

Details

Message ID 20190917234354.1766-2-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Sept. 17, 2019, 11:43 p.m.
Fixes: Timeout (30sec -> 25sec)
Fixes: 17050/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5719149803732992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/motionpixels.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Sept. 28, 2019, 5:23 p.m.
On Wed, Sep 18, 2019 at 01:43:54AM +0200, Michael Niedermayer wrote:
> Fixes: Timeout (30sec -> 25sec)
> Fixes: 17050/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5719149803732992
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/motionpixels.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

will apply

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index be45586e3d..6cb444a703 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -171,7 +171,7 @@  static int mp_read_codes_table(MotionPixelsContext *mp, GetBitContext *gb)
    return 0;
 }
 
-static int mp_gradient(MotionPixelsContext *mp, int component, int v)
+static av_always_inline int mp_gradient(MotionPixelsContext *mp, int component, int v)
 {
     int delta;
 
@@ -196,7 +196,7 @@  static void mp_set_rgb_from_yuv(MotionPixelsContext *mp, int x, int y, const Yuv
     *(uint16_t *)&mp->frame->data[0][y * mp->frame->linesize[0] + x * 2] = color;
 }
 
-static int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb)
+static av_always_inline int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb)
 {
     int i;