[FFmpeg-devel] [PATCH 4/6] lavc/libvpxenc: remove redundant condition check

mypopy at gmail.com mypopy at gmail.com
Mon May 13 04:35:38 EEST 2019


On Sat, May 11, 2019 at 3:14 AM Vignesh Venkatasubramanian
<vigneshv-at-google.com at ffmpeg.org> wrote:
>
> From: Jun Zhao <mypopydev at gmail.com>
> Date: Fri, May 10, 2019 at 9:06 AM
> To: <ffmpeg-devel at ffmpeg.org>
> Cc: Jun Zhao
>
> > From: Jun Zhao <barryjzhao at tencent.com>
> >
> > Redundant condition: '!A || B' is equivalent to '!A || (A && B)' but
> > more clearly.
> >
> > Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
> > ---
> >  libavcodec/libvpxenc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
> > index c823b8a..feb52ea 100644
> > --- a/libavcodec/libvpxenc.c
> > +++ b/libavcodec/libvpxenc.c
> > @@ -978,7 +978,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out)
> >         are only good through the next vpx_codec call */
> >      while ((pkt = vpx_codec_get_cx_data(&ctx->encoder, &iter)) &&
> >             (!ctx->is_alpha ||
> > -            (ctx->is_alpha && (pkt_alpha = vpx_codec_get_cx_data(&ctx->encoder_alpha, &iter_alpha))))) {
> > +            (pkt_alpha = vpx_codec_get_cx_data(&ctx->encoder_alpha, &iter_alpha)))) {
> >          switch (pkt->kind) {
> >          case VPX_CODEC_CX_FRAME_PKT:
> >              if (!size) {
> > --
> > 1.7.1
> >
>
> lgtm.
>
Pushed, Thanks


More information about the ffmpeg-devel mailing list