summaryrefslogtreecommitdiff
path: root/libavformat/img.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-03-11 00:22:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-03-11 00:22:21 +0000
commitc04c3282b4334ff64cfd69d40fea010602e830fd (patch)
treeb07e0f447e3146669703bf86229925a44ebd628e /libavformat/img.c
parente7c8206e5c4ee83eccb487583331fb39ba73a136 (diff)
simplify AVFormatParameters NULL checks
Originally committed as revision 5146 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/img.c')
-rw-r--r--libavformat/img.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/img.c b/libavformat/img.c
index addcae6574..1943c517d2 100644
--- a/libavformat/img.c
+++ b/libavformat/img.c
@@ -120,7 +120,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
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 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
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 @@ static int img_set_parameters(AVFormatContext *s, AVFormatParameters *ap)
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);