[FFmpeg-devel] [PATCH] libavcodec/mpeg12dec.c: Switch to init_get_bits8 and checks return value
Thierry Foucu
tfoucu at gmail.com
Tue Jul 27 21:24:50 EEST 2021
On Fri, Jul 23, 2021 at 2:13 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:
> On Thu, Jul 22, 2021 at 11:08:51AM -0700, Thierry Foucu wrote:
> > ---
> > libavcodec/mpeg12dec.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
> > index b27ed5bd6d..269619540a 100644
> > --- a/libavcodec/mpeg12dec.c
> > +++ b/libavcodec/mpeg12dec.c
> > @@ -1341,8 +1341,11 @@ static int mpeg1_decode_picture(AVCodecContext
> *avctx, const uint8_t *buf,
> > Mpeg1Context *s1 = avctx->priv_data;
> > MpegEncContext *s = &s1->mpeg_enc_ctx;
> > int ref, f_code, vbv_delay;
>
> > + int ret = 0;
> > + ret = init_get_bits8(&s->gb, buf, buf_size);
>
> redundant assignment
>
Sorry, will send new patch.
>
> thx
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Rewriting code that is poorly written but fully understood is good.
> Rewriting code that one doesnt understand is a sign that one is less smart
> than the original author, trying to rewrite it will not make it better.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
--
Thierry Foucu
More information about the ffmpeg-devel
mailing list