summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 76161e9730..389307b569 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -299,7 +299,7 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
av_fast_padded_malloc(&h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+MAX_MBPAIR_SIZE);
dst = h->rbsp_buffer[bufidx];
- if (dst == NULL)
+ if (!dst)
return NULL;
if(i>=length-1){ //no escaped 0
@@ -1417,7 +1417,7 @@ static int get_last_needed_nal(H264Context *h, const uint8_t *buf, int buf_size)
ptr = ff_h264_decode_nal(h, buf + buf_index, &dst_length, &consumed,
next_avc - buf_index);
- if (ptr == NULL || dst_length < 0)
+ if (!ptr || dst_length < 0)
return AVERROR_INVALIDDATA;
buf_index += consumed;
@@ -1516,7 +1516,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
ptr = ff_h264_decode_nal(hx, buf + buf_index, &dst_length,
&consumed, next_avc - buf_index);
- if (ptr == NULL || dst_length < 0) {
+ if (!ptr || dst_length < 0) {
ret = -1;
goto end;
}