diff img.c @ 1003:2d57ce58f576 libavformat

simplify AVFormatParameters NULL checks
author michael
date Sat, 11 Mar 2006 00:22:21 +0000
parents edbe5c3717f9
children 5c750fb6b8cc
line wrap: on
line diff
--- a/img.c	Wed Mar 08 21:51:39 2006 +0000
+++ b/img.c	Sat Mar 11 00:22:21 2006 +0000
@@ -120,7 +120,7 @@
         return -ENOMEM;
     }
 
-    if (ap && ap->image_format)
+    if (ap->image_format)
         s->img_fmt = ap->image_format;
 
     pstrcpy(s->path, sizeof(s->path), s1->filename);
@@ -133,7 +133,7 @@
     else
         s->is_pipe = 1;
 
-    if (!ap || !ap->time_base.num) {
+    if (!ap->time_base.num) {
         st->codec->time_base= (AVRational){1,25};
     } else {
         st->codec->time_base= ap->time_base;
@@ -255,7 +255,7 @@
     int i;
 
     /* find output image format */
-    if (ap && ap->image_format) {
+    if (ap->image_format) {
         img_fmt = ap->image_format;
     } else {
         img_fmt = guess_image_format(s->filename);