diff options
author | Gabriel Dume <gabriel.ddx84@gmail.com> | 2014-08-14 16:31:24 -0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-08-15 03:18:18 -0700 |
commit | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 (patch) | |
tree | 5b93402fb37cc43b899451a5d2b65bfc03d7887b /libavformat/sdp.c | |
parent | efd26bedec9a345a5960dbfcbaec888418f2d4e6 (diff) | |
download | ffmpeg-f929ab0569ff31ed5a59b0b0adb7ce09df3fca39.tar.gz |
cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r-- | libavformat/sdp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 895b9d6f4c..a690219006 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -189,7 +189,7 @@ static char *extradata2psets(AVCodecContext *c) } psets = av_mallocz(MAX_PSET_SIZE); - if (psets == NULL) { + if (!psets) { av_log(c, AV_LOG_ERROR, "Cannot allocate memory for the parameter sets.\n"); av_free(orig_extradata); return NULL; @@ -216,7 +216,7 @@ static char *extradata2psets(AVCodecContext *c) sps = r; sps_end = r1; } - if (av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r) == NULL) { + if (!av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r)) { av_log(c, AV_LOG_ERROR, "Cannot Base64-encode %td %td!\n", MAX_PSET_SIZE - (p - psets), r1 - r); av_free(psets); @@ -250,7 +250,7 @@ static char *extradata2config(AVCodecContext *c) return NULL; } config = av_malloc(10 + c->extradata_size * 2); - if (config == NULL) { + if (!config) { av_log(c, AV_LOG_ERROR, "Cannot allocate memory for the config info.\n"); return NULL; } @@ -457,7 +457,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, av_log(c, AV_LOG_ERROR, "AAC with no global headers is currently not supported.\n"); return NULL; } - if (config == NULL) { + if (!config) { return NULL; } av_strlcatf(buff, size, "a=rtpmap:%d MPEG4-GENERIC/%d/%d\r\n" |