OSDN Git Service

rtpdec: Remove unnecessary checks
authorMartin Storsjö <martin@martin.st>
Tue, 24 Feb 2015 11:30:12 +0000 (13:30 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 24 Feb 2015 21:07:14 +0000 (23:07 +0200)
The free function of a depacketizer won't be called if data is NULL.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_h263_rfc2190.c
libavformat/rtpdec_latm.c

index a7e8287..ae6e38e 100644 (file)
@@ -41,8 +41,6 @@ struct PayloadContext {
 
 static void h263_free_context(PayloadContext *data)
 {
-    if (!data)
-        return;
     if (data->buf) {
         uint8_t *p;
         avio_close_dyn_buf(data->buf, &p);
index 9758efa..2da0fbf 100644 (file)
@@ -33,8 +33,6 @@ struct PayloadContext {
 
 static void latm_free_context(PayloadContext *data)
 {
-    if (!data)
-        return;
     if (data->dyn_buf) {
         uint8_t *p;
         avio_close_dyn_buf(data->dyn_buf, &p);