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/mpeg12dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/mpeg12dec.c') diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 5a875c2518..2b86ea87fe 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2488,7 +2488,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, return -1; } - if (s2->last_picture_ptr == NULL) { + if (!s2->last_picture_ptr) { /* Skip B-frames if we do not have reference frames and * GOP is not closed. */ if (s2->pict_type == AV_PICTURE_TYPE_B) { @@ -2500,7 +2500,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, } if (s2->pict_type == AV_PICTURE_TYPE_I) s->sync = 1; - if (s2->next_picture_ptr == NULL) { + if (!s2->next_picture_ptr) { /* Skip P-frames if we do not have a reference frame or * we have an invalid header. */ if (s2->pict_type == AV_PICTURE_TYPE_P && !s->sync) { -- cgit v1.2.3