diff options
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 7d1109cb89..1fd5e506cd 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -286,7 +286,7 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, length + FF_INPUT_BUFFER_PADDING_SIZE); dst = h->rbsp_buffer[bufidx]; - if (dst == NULL) + if (!dst) return NULL; memcpy(dst, src, i); @@ -1379,7 +1379,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; @@ -1460,7 +1460,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; } |