From f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 Mon Sep 17 00:00:00 2001 From: Gabriel Dume Date: Thu, 14 Aug 2014 16:31:24 -0400 Subject: cosmetics: Write NULL pointer equality checks more compactly Signed-off-by: Diego Biurrun --- libavcodec/h263dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/h263dec.c') diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index a9cdb9e37d..e7ce56c699 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -457,7 +457,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, if ((ret = ff_mpv_common_init(s)) < 0) return ret; - if (s->current_picture_ptr == NULL || s->current_picture_ptr->f->data[0]) { + if (!s->current_picture_ptr || s->current_picture_ptr->f->data[0]) { int i = ff_find_unused_picture(s, 0); if (i < 0) return i; @@ -517,7 +517,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; /* skip B-frames if we don't have reference frames */ - if (s->last_picture_ptr == NULL && + if (!s->last_picture_ptr && (s->pict_type == AV_PICTURE_TYPE_B || s->droppable)) return get_consumed_bytes(s, buf_size); if ((avctx->skip_frame >= AVDISCARD_NONREF && -- cgit v1.2.3