summaryrefslogtreecommitdiff
path: root/libavformat/raw.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/raw.c
parente7c8206e5c4ee83eccb487583331fb39ba73a136 (diff)
simplify AVFormatParameters NULL checks
Originally committed as revision 5146 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r--libavformat/raw.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c
index 5a007ca7ae..d1e01f2500 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -48,7 +48,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
st = av_new_stream(s, 0);
if (!st)
return AVERROR_NOMEM;
- if (ap) {
+
id = s->iformat->value;
if (id == CODEC_ID_RAWVIDEO) {
st->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -74,9 +74,6 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
default:
return -1;
}
- } else {
- return -1;
- }
return 0;
}
@@ -289,7 +286,7 @@ static int video_read_header(AVFormatContext *s,
/* for mjpeg, specify frame rate */
/* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/
- if (ap && ap->time_base.num) {
+ if (ap->time_base.num) {
av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
} else if ( st->codec->codec_id == CODEC_ID_MJPEG ||
st->codec->codec_id == CODEC_ID_MPEG4 ||