diff mbox series

[FFmpeg-devel,1/3] avcodec/mjpegdec: Cleanup ff_smvjpeg_decoder()

Message ID 20201220211524.5581-1-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/3] avcodec/mjpegdec: Cleanup ff_smvjpeg_decoder()
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Niedermayer Dec. 20, 2020, 9:15 p.m. UTC
Fixes: memleaks
Fixes: 28533/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6242529653686272

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

Comments

Anton Khirnov Feb. 4, 2021, 11:10 a.m. UTC | #1
Quoting Michael Niedermayer (2020-12-20 22:15:22)
> Fixes: memleaks
> Fixes: 28533/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6242529653686272
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/mjpegdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
> index 11fb809c10..901ee228ab 100644
> --- a/libavcodec/mjpegdec.c
> +++ b/libavcodec/mjpegdec.c
> @@ -3031,7 +3031,7 @@ AVCodec ff_smvjpeg_decoder = {
>      .receive_frame  = ff_mjpeg_receive_frame,
>      .flush          = decode_flush,
>      .capabilities   = AV_CODEC_CAP_DR1,
> -    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING |
> +    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_EXPORTS_CROPPING |

Please put it on the second line.

Looks good otherwise.
Michael Niedermayer Feb. 22, 2021, 4:57 p.m. UTC | #2
On Thu, Feb 04, 2021 at 12:10:38PM +0100, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2020-12-20 22:15:22)
> > Fixes: memleaks
> > Fixes: 28533/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6242529653686272
> > 
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavcodec/mjpegdec.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
> > index 11fb809c10..901ee228ab 100644
> > --- a/libavcodec/mjpegdec.c
> > +++ b/libavcodec/mjpegdec.c
> > @@ -3031,7 +3031,7 @@ AVCodec ff_smvjpeg_decoder = {
> >      .receive_frame  = ff_mjpeg_receive_frame,
> >      .flush          = decode_flush,
> >      .capabilities   = AV_CODEC_CAP_DR1,
> > -    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING |
> > +    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_EXPORTS_CROPPING |
> 
> Please put it on the second line.
> 
> Looks good otherwise.

will apply with that changed

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 11fb809c10..901ee228ab 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -3031,7 +3031,7 @@  AVCodec ff_smvjpeg_decoder = {
     .receive_frame  = ff_mjpeg_receive_frame,
     .flush          = decode_flush,
     .capabilities   = AV_CODEC_CAP_DR1,
-    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING |
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_EXPORTS_CROPPING |
                       FF_CODEC_CAP_SETS_PKT_DTS,
 };
 #endif