On Mon, Jan 27, 2020 at 06:09:28PM -0300, James Almer wrote: > On 1/27/2020 5:54 PM, Michael Niedermayer wrote: > > Fixes use of uninitialized variable and segfault > > > > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > > --- > > libavcodec/avdct.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/avdct.c b/libavcodec/avdct.c > > index 47e5f7134e..7c761cf39a 100644 > > --- a/libavcodec/avdct.c > > +++ b/libavcodec/avdct.c > > @@ -100,7 +100,7 @@ int avcodec_dct_init(AVDCT *dsp) > > > > #if CONFIG_IDCTDSP > > { > > - IDCTDSPContext idsp; > > + IDCTDSPContext idsp = {0}; > > Should probably be a memset() in ff_idctdsp_init(). This is not the only > IDCTDSPContext user.
this would not work as IDCTDSPContext.mpeg4_studio_profile must be initialized but it is also an input to ff_idctdsp_init() an alternative to the = {0} on the caller side would be to simply add the mpeg4_studio_profile as an argument to ff_idctdsp_init() and remove it from the context, its all just internal API so we can easily redesign this. It should also be documented better ... What do you suggest ? thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".